nix-bash-completions icon indicating copy to clipboard operation
nix-bash-completions copied to clipboard

Upstream Nix completion conflict

Open bjornfor opened this issue 2 years ago • 2 comments

It seems that both this project and upstream Nix provides completion for the nix command. From my testing, having modern Nix (e.g., 2.7.0) and nix-bash-completions installed breaks bash completion in the following way:

$ nix build<cursor>    # pressing TAB+TAB erases the whole line

I guess this project added completion support for nix before upstream did? I can submit a PR to remove nix completion from this project, if you like.

bjornfor avatar Apr 09 '22 20:04 bjornfor

I forgot that nix-2.3 doesn't have built-in completion, so we shouldn't remove completion from this repo (as that would break on NixOS 21.11), but rather make it version dependent?

bjornfor avatar Apr 09 '22 20:04 bjornfor

Manually sourcing /nix/store/HASH-nix-2.7.0/share/bash-completion/completions/nix fixes completion.

bjornfor avatar Apr 09 '22 21:04 bjornfor