Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use _have instead of have for bash completion #497

Merged
merged 1 commit into from Aug 20, 2018

Conversation

uskudnik
Copy link
Contributor

have is deprecated and gets unset at the end of
bash_completion which can cause issues in certain situations
(specifically when running bash_completion on NixOS - because
the script is evaluated at the start but can't finish properly
because have is already unset at that point).

`have` is deprecated[1] and gets unset at the end of
bash_completion[2] which can cause issues in certain situations
(specifically when running bash_completion on NixOS - because
the script is evaluated at the start[3] but can't finish properly
because `have` is already unset at that point)

[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
@uskudnik uskudnik changed the title Use _have instead of have Use _have instead of have for bash completion Aug 19, 2018
@bwbeach bwbeach merged commit f0822f0 into Backblaze:master Aug 20, 2018
@luckman212
Copy link

Problem... This commit causes

-bash: _have: command not found

To appear on every Terminal launch.

  • macOS 10.13.6
  • b2-tools installed via Homebrew

uskudnik added a commit to uskudnik/nixpkgs that referenced this pull request Sep 3, 2018
backblaze v1.3.6 incorporates[1] a fix[2] for autocompletion that replaced
`have` function with `_have`. The postInstall hook therefore needs
to be updated to replace `_have`.

[1] https://github.com/Backblaze/B2_Command_Line_Tool#136-august-21-2018
[2] Backblaze/B2_Command_Line_Tool#497
domenkozar pushed a commit to NixOS/nixpkgs that referenced this pull request Sep 3, 2018
backblaze v1.3.6 incorporates[1] a fix[2] for autocompletion that replaced
`have` function with `_have`. The postInstall hook therefore needs
to be updated to replace `_have`.

[1] https://github.com/Backblaze/B2_Command_Line_Tool#136-august-21-2018
[2] Backblaze/B2_Command_Line_Tool#497
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants