mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-09-23 05:37:27 +03:00
nodePackages.graphite-cli: fix zsh completion
The yargs library auto-detects the shell from the environment to emit the appropriate completion script. Currently the override is emitting the bash completion script twice. Setting ZSH_NAME=zsh is a simple way to emit the zshell completion script.
This commit is contained in:
parent
d377d9bc2e
commit
02573873ec
@ -188,10 +188,12 @@ final: prev: {
|
||||
graphite-cli = prev."@withgraphite/graphite-cli".override {
|
||||
name = "graphite-cli";
|
||||
nativeBuildInputs = [ pkgs.installShellFiles ];
|
||||
# 'gt completion' auto-detects zshell from environment variables:
|
||||
# https://github.com/yargs/yargs/blob/2b6ba3139396b2e623aed404293f467f16590039/lib/completion.ts#L45
|
||||
postInstall = ''
|
||||
installShellCompletion --cmd gt \
|
||||
--bash <($out/bin/gt completion) \
|
||||
--zsh <($out/bin/gt completion)
|
||||
--zsh <(ZSH_NAME=zsh $out/bin/gt completion)
|
||||
'';
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user