diff options
author | Oleg Pykhalov <go.wigust@gmail.com> | 2018-02-17 12:05:26 +0300 |
---|---|---|
committer | Oleg Pykhalov <go.wigust@gmail.com> | 2018-02-17 22:23:07 +0300 |
commit | f5f916792c7069a22d95c5b7c68bcf3bbb86e451 (patch) | |
tree | a6a8652c710b0abcfc538b5d2fd81dee318d4734 | |
parent | a39aa6839464ce7233d441e1cd807bc8eca1d622 (diff) | |
download | guix-f5f916792c7069a22d95c5b7c68bcf3bbb86e451.tar.gz guix-f5f916792c7069a22d95c5b7c68bcf3bbb86e451.zip |
bash completion: Complete files names after 'guix package -m'.
* etc/completion/bash/guix (_guix_is_dash_m): New function.
(_guix_complete): Add this.
-rw-r--r-- | etc/completion/bash/guix | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/etc/completion/bash/guix b/etc/completion/bash/guix index 6b84193dbe..70430c5c95 100644 --- a/etc/completion/bash/guix +++ b/etc/completion/bash/guix @@ -106,6 +106,15 @@ _guix_is_dash_L () esac } } +_guix_is_dash_m () +{ + [ "${COMP_WORDS[$COMP_CWORD - 1]}" = "-m" ] \ + || { case "${COMP_WORDS[$COMP_CWORD]}" in + --manifest=*) true;; + *) false;; + esac } +} + _guix_complete_file () { # Let Readline complete file names. @@ -149,7 +158,7 @@ _guix_complete () *) if _guix_is_command "package" then - if _guix_is_dash_L + if _guix_is_dash_L || _guix_is_dash_m then _guix_complete_file elif _guix_is_removing |