diff options
author | Urban Skudnik <urban.skudnik@gmail.com> | 2018-08-19 16:00:38 +0200 |
---|---|---|
committer | Urban Skudnik <urban.skudnik@gmail.com> | 2018-08-19 22:13:42 +0200 |
commit | af5511659c82cf914f8acedbfd5a81dac5449c7e (patch) | |
tree | ecb2bbe355e65c45ceab23773baae313cd81d571 /pkgs/development/tools/backblaze-b2 | |
parent | 1a08bcf198708abd080e36ce58c1fafedc88eb7c (diff) |
backblaze-b2: Fix backblaze bash autocomplete issue
Backblaze's CLI tool is relying on `have` function which is
deprecated[1] and gets dereferenced[2] at the end of `bash-completion`.
This causes issues for NixOS because those bash completions are
run after bash-completion[3] has already run and unset the
`have` function.
[1] https://github.com/scop/bash-completion/blob/4d88339928aa064a567d5feb40694dfd24a274c5/bash_completion#L114
[2] https://github.com/scop/bash-completion/blob/4d88339928aa064a567d5feb40694dfd24a274c5/bash_completion#L2103
[3] https://github.com/NixOS/nixpkgs/blob/80b6513fbf5789ff0208c19a89bae49df2b503ad/nixos/modules/programs/bash/bash.nix#L22
Diffstat (limited to 'pkgs/development/tools/backblaze-b2')
-rw-r--r-- | pkgs/development/tools/backblaze-b2/default.nix | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkgs/development/tools/backblaze-b2/default.nix b/pkgs/development/tools/backblaze-b2/default.nix index 19609e15c765..7cf709066542 100644 --- a/pkgs/development/tools/backblaze-b2/default.nix +++ b/pkgs/development/tools/backblaze-b2/default.nix @@ -22,7 +22,7 @@ buildPythonApplication rec { postInstall = '' mv "$out/bin/b2" "$out/bin/backblaze-b2" - sed 's/^have b2 \&\&$/have backblaze-b2 \&\&/' -i contrib/bash_completion/b2 + sed 's/^have b2 \&\&$/_have backblaze-b2 \&\&/' -i contrib/bash_completion/b2 sed 's/^\(complete -F _b2\) b2/\1 backblaze-b2/' -i contrib/bash_completion/b2 mkdir -p "$out/etc/bash_completion.d" |