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.
This commit is contained in:
Ludovic Courtès 2017-02-06 16:50:07 +01:00
parent 3454f7edf9
commit e109ed3922
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -154,7 +154,10 @@ _guix_complete ()
fi fi
elif _guix_is_command "system" elif _guix_is_command "system"
then 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" elif _guix_is_command "import"
then then
_guix_complete_subcommand _guix_complete_subcommand