completion.*: add flake-related arguments

This commit is contained in:
Shamrock Lee 2022-02-12 18:53:33 +00:00 committed by Robert Helgesson
parent 23a9f9127c
commit 50204cea94
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89
3 changed files with 16 additions and 2 deletions

View file

@ -293,7 +293,9 @@ _home-manager_completions ()
Options=( "-f" "--file" "-b" "-A" "-I" "-h" "--help" "-n" "--dry-run" "-v" \
"--verbose" "--cores" "--debug" "--impure" "--keep-failed" \
"--keep-going" "-j" "--max-jobs" "--no-substitute" "--no-out-link" \
"--show-trace" "--substitute" "--builders" "--version")
"--show-trace" "--substitute" "--builders" "--version" \
"--update-input" "--override-input" "--experimental-features" \
"--extra-experimental-features" )
# ^ « home-manager »'s options.

View file

@ -64,3 +64,7 @@ complete -c home-manager -f -l "show-trace" -d "Print stack trace of evaluation
complete -c home-manager -f -l "substitute"
complete -c home-manager -f -l "no-substitute"
complete -c home-manager -f -l "no-out-link"
complete -c home-manager -f -l "update-input"
complete -c home-manager -f -l "override-input"
complete -c home-manager -f -l "experimental-features"
complete -c home-manager -f -l "extra-experimental-features"

View file

@ -20,6 +20,10 @@ _arguments \
'--option[option]:NAME VALUE:()' \
'--builders[builders]:SPEC:()' \
'--show-trace[show trace]' \
'--override-input[override flake input]:NAME VALUE:()' \
'--update-input[update flake input]:NAME:()' \
'--experimental-features[set experimental Nix features]:VALUE:()' \
'--extra-experimental-features:[append to experimental Nix features]:VALUE:()' \
'1: :->cmds' \
'*:: :->args' && ret=0
@ -57,7 +61,11 @@ case "$state" in
'--option[option]:NAME VALUE:()' \
'--show-trace[show trace]' \
'--substitute[substitute]' \
'--builders[builders]:SPEC:()'
'--builders[builders]:SPEC:()' \
'--override-input[override flake input]:NAME VALUE:()' \
'--update-input[update flake input]:NAME:()' \
'--experimental-features[set experimental Nix features]:VALUE:()' \
'--extra-experimental-features:[append to experimental Nix features]:VALUE:()'
;;
esac
esac