diff options
Diffstat (limited to 'misc')
-rw-r--r-- | misc/bash/completion.sh | 7 | ||||
-rw-r--r-- | misc/bash/local.mk | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/misc/bash/completion.sh b/misc/bash/completion.sh new file mode 100644 index 000000000..097353b50 --- /dev/null +++ b/misc/bash/completion.sh @@ -0,0 +1,7 @@ +function _complete_nix { + while IFS= read -r line; do + COMPREPLY+=("$line") + done < <(NIX_GET_COMPLETIONS=$COMP_CWORD "${COMP_WORDS[@]}") +} + +complete -F _complete_nix nix diff --git a/misc/bash/local.mk b/misc/bash/local.mk new file mode 100644 index 000000000..99ada5108 --- /dev/null +++ b/misc/bash/local.mk @@ -0,0 +1 @@ +$(eval $(call install-file-as, $(d)/completion.sh, $(datarootdir)/bash-completion/completions/_nix3, 0644)) |