summaryrefslogtreecommitdiff
path: root/etc/completion/bash
diff options
context:
space:
mode:
authorOleg Pykhalov <go.wigust@gmail.com>2018-02-17 12:05:26 +0300
committerOleg Pykhalov <go.wigust@gmail.com>2018-02-17 22:23:07 +0300
commitf5f916792c7069a22d95c5b7c68bcf3bbb86e451 (patch)
treea6a8652c710b0abcfc538b5d2fd81dee318d4734 /etc/completion/bash
parenta39aa6839464ce7233d441e1cd807bc8eca1d622 (diff)
bash completion: Complete files names after 'guix package -m'.
* etc/completion/bash/guix (_guix_is_dash_m): New function. (_guix_complete): Add this.
Diffstat (limited to 'etc/completion/bash')
-rw-r--r--etc/completion/bash/guix11
1 files changed, 10 insertions, 1 deletions
diff --git a/etc/completion/bash/guix b/etc/completion/bash/guix
index 6b84193dbe0..70430c5c959 100644
--- a/etc/completion/bash/guix
+++ b/etc/completion/bash/guix
@@ -106,6 +106,15 @@ _guix_is_dash_L ()
106 esac } 106 esac }
107} 107}
108 108
109_guix_is_dash_m ()
110{
111 [ "${COMP_WORDS[$COMP_CWORD - 1]}" = "-m" ] \
112 || { case "${COMP_WORDS[$COMP_CWORD]}" in
113 --manifest=*) true;;
114 *) false;;
115 esac }
116}
117
109_guix_complete_file () 118_guix_complete_file ()
110{ 119{
111 # Let Readline complete file names. 120 # Let Readline complete file names.
@@ -149,7 +158,7 @@ _guix_complete ()
149 *) 158 *)
150 if _guix_is_command "package" 159 if _guix_is_command "package"
151 then 160 then
152 if _guix_is_dash_L 161 if _guix_is_dash_L || _guix_is_dash_m
153 then 162 then
154 _guix_complete_file 163 _guix_complete_file
155 elif _guix_is_removing 164 elif _guix_is_removing