summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2017-02-06 16:50:07 +0100
committerLudovic Courtès <ludo@gnu.org>2017-02-07 00:08:10 +0100
commite109ed3922f2a3ff68a77f727ead27f2eb4a82ab (patch)
tree0650463271cf6270440e41195e75eb28c23d137b /etc
parent3454f7edf9eb2901115cab522d980df712fa4078 (diff)
downloadgnu-guix-e109ed3922f2a3ff68a77f727ead27f2eb4a82ab.tar
gnu-guix-e109ed3922f2a3ff68a77f727ead27f2eb4a82ab.tar.gz
bash completion: Complete file names after 'guix system COMMAND'.
* etc/completion/bash/guix (_guix_complete): When the command is "system" and $COMP_CWORD > 2, use _guix_complete_file.
Diffstat (limited to 'etc')
-rw-r--r--etc/completion/bash/guix5
1 files changed, 4 insertions, 1 deletions
diff --git a/etc/completion/bash/guix b/etc/completion/bash/guix
index 01b0e20394..9c851e3717 100644
--- a/etc/completion/bash/guix
+++ b/etc/completion/bash/guix
@@ -154,7 +154,10 @@ _guix_complete ()
fi
elif _guix_is_command "system"
then
- _guix_complete_subcommand
+ case $COMP_CWORD in
+ 2) _guix_complete_subcommand;;
+ *) _guix_complete_file;; # TODO: restrict to *.scm
+ esac
elif _guix_is_command "import"
then
_guix_complete_subcommand