diff options
author | ralismark <13449732+ralismark@users.noreply.github.com> | 2023-01-26 16:35:46 +1100 |
---|---|---|
committer | Matthieu Coudron <teto@users.noreply.github.com> | 2023-01-26 15:37:33 +0100 |
commit | 5b310f272b7f043ec25b19f738c07ae59a0b1203 (patch) | |
tree | 00427a4fd3eabfa04837726ec03a844dc7344fc1 /pkgs/applications/version-management | |
parent | cb3fb49bf53d7e2f9eb1c9af8ff5b15ca15ed517 (diff) |
lab: fix zsh completion
Diffstat (limited to 'pkgs/applications/version-management')
-rw-r--r-- | pkgs/applications/version-management/lab/default.nix | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/pkgs/applications/version-management/lab/default.nix b/pkgs/applications/version-management/lab/default.nix index 754fa778fed9..f79b59b56396 100644 --- a/pkgs/applications/version-management/lab/default.nix +++ b/pkgs/applications/version-management/lab/default.nix @@ -22,14 +22,16 @@ buildGoModule rec { ldflags = [ "-s" "-w" "-X main.version=${version}" ]; postInstall = '' - # make xdg-open overrideable at runtime - wrapProgram $out/bin/lab \ - --prefix PATH ":" "${lib.makeBinPath [ git ]}" \ - --suffix PATH ":" "${lib.makeBinPath [ xdg-utils ]}" + # create shell completions before wrapProgram so that lab detects the right + # path for itself installShellCompletion --cmd lab \ --bash <($out/bin/lab completion bash) \ --fish <($out/bin/lab completion fish) \ --zsh <($out/bin/lab completion zsh) + # make xdg-open overrideable at runtime + wrapProgram $out/bin/lab \ + --prefix PATH ":" "${lib.makeBinPath [ git ]}" \ + --suffix PATH ":" "${lib.makeBinPath [ xdg-utils ]}" ''; meta = with lib; { |