Describe the bug
nix-store --gc -- outputs:
$ nix-store --gc --
--delete)--print-roots --include --option --print-dead --version
--help --max-freed --print* --print-live
instead of --print-roots autocomplete is suggesting --delete)--print-roots which is not a valid command.
--delete should not be suggested as an option for --gc at all
Steps To Reproduce
- Open terminal with bash shell
- type
nix-store --gc --
- Hit tab
Expected behavior
$ nix-store --gc --
--help --max-freed --print* --print-live --version
--include --option --print-dead --print-roots
Metadata
nix-env (Nix) 2.34.7
Additional context
find /nix/ -iname nix-store to find share/bash-completion/completions/nix-store
cat /nix/store/y0kdq8sxjy9jmdr9pv2gq78vpmzvxpf8-system-path/share/bash-completion/completions/nix-store > completions
- Line 417-422:
local -a nix_gc_common=(
'(- --print* --delete)--print-roots'
'(-|--print*|--delete)--print-live'
'(-|--print*|--delete)--print-dead'
'(-|--print*|--delete)--delete'
)
print-roots is missing 2 | symbols
I believe src/nix/nix-store/nix-store.cc and misc/bash/completion.sh are doing some unholy shell magic to generate this, but I'm not sure where the | is getting lost
Checklist
Add 👍 to issues you find important.
Describe the bug
nix-store --gc --outputs:instead of
--print-rootsautocomplete is suggesting--delete)--print-rootswhich is not a valid command.--deleteshould not be suggested as an option for--gcat allSteps To Reproduce
nix-store --gc --Expected behavior
Metadata
nix-env (Nix) 2.34.7Additional context
find /nix/ -iname nix-storeto findshare/bash-completion/completions/nix-storecat /nix/store/y0kdq8sxjy9jmdr9pv2gq78vpmzvxpf8-system-path/share/bash-completion/completions/nix-store > completionsprint-roots is missing 2
|symbolsI believe src/nix/nix-store/nix-store.cc and misc/bash/completion.sh are doing some unholy shell magic to generate this, but I'm not sure where the
|is getting lostChecklist
Add 👍 to issues you find important.