bash completion: Complete ‘guix shell -f’.

* etc/completion/bash/guix (_guix_complete): Suggest a file name
following ‘guix shell […] -f’.
This commit is contained in:
Tobias Geerinckx-Rice 2021-12-08 21:05:20 +01:00
parent 0ba4e94e84
commit f3af1fb0bc
No known key found for this signature in database
GPG Key ID: 0DB0FF884F556D79
1 changed files with 7 additions and 3 deletions

View File

@ -275,9 +275,13 @@ _guix_complete ()
fi
elif [[ "$command" = "environment" || "$command" = "shell" ]]
then
if _guix_is_dash_L || _guix_is_dash_m || _guix_is_dash_p || _guix_is_dash_l
then
_guix_complete_file
if _guix_is_dash_f && [[ "$command" = "shell" ]]
then
# The otherwise identical guix environment lacks the -f option.
_guix_complete_file
elif _guix_is_dash_L || _guix_is_dash_m || _guix_is_dash_p || _guix_is_dash_l
then
_guix_complete_file
elif _guix_is_option "$word_at_point"
then
_guix_complete_option "$command_index" "$word_at_point"