mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 05:18:07 -05:00
bash completion: Complete files names after 'guix package -m'.
* etc/completion/bash/guix (_guix_is_dash_m): New function. (_guix_complete): Add this.
This commit is contained in:
parent
a39aa68394
commit
f5f916792c
1 changed files with 10 additions and 1 deletions
|
@ -106,6 +106,15 @@ _guix_is_dash_L ()
|
||||||
esac }
|
esac }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_guix_is_dash_m ()
|
||||||
|
{
|
||||||
|
[ "${COMP_WORDS[$COMP_CWORD - 1]}" = "-m" ] \
|
||||||
|
|| { case "${COMP_WORDS[$COMP_CWORD]}" in
|
||||||
|
--manifest=*) true;;
|
||||||
|
*) false;;
|
||||||
|
esac }
|
||||||
|
}
|
||||||
|
|
||||||
_guix_complete_file ()
|
_guix_complete_file ()
|
||||||
{
|
{
|
||||||
# Let Readline complete file names.
|
# Let Readline complete file names.
|
||||||
|
@ -149,7 +158,7 @@ _guix_complete ()
|
||||||
*)
|
*)
|
||||||
if _guix_is_command "package"
|
if _guix_is_command "package"
|
||||||
then
|
then
|
||||||
if _guix_is_dash_L
|
if _guix_is_dash_L || _guix_is_dash_m
|
||||||
then
|
then
|
||||||
_guix_complete_file
|
_guix_complete_file
|
||||||
elif _guix_is_removing
|
elif _guix_is_removing
|
||||||
|
|
Loading…
Reference in a new issue