[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/01: bash completion: Complete files names after 'guix package -m'.
From: |
Oleg Pykhalov |
Subject: |
01/01: bash completion: Complete files names after 'guix package -m'. |
Date: |
Sat, 17 Feb 2018 14:23:49 -0500 (EST) |
wigust pushed a commit to branch master
in repository guix.
commit f5f916792c7069a22d95c5b7c68bcf3bbb86e451
Author: Oleg Pykhalov <address@hidden>
Date: Sat Feb 17 12:05:26 2018 +0300
bash completion: Complete files names after 'guix package -m'.
* etc/completion/bash/guix (_guix_is_dash_m): New function.
(_guix_complete): Add this.
---
etc/completion/bash/guix | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/etc/completion/bash/guix b/etc/completion/bash/guix
index 6b84193..70430c5 100644
--- a/etc/completion/bash/guix
+++ b/etc/completion/bash/guix
@@ -106,6 +106,15 @@ _guix_is_dash_L ()
esac }
}
+_guix_is_dash_m ()
+{
+ [ "${COMP_WORDS[$COMP_CWORD - 1]}" = "-m" ] \
+ || { case "${COMP_WORDS[$COMP_CWORD]}" in
+ --manifest=*) true;;
+ *) false;;
+ esac }
+}
+
_guix_complete_file ()
{
# Let Readline complete file names.
@@ -149,7 +158,7 @@ _guix_complete ()
*)
if _guix_is_command "package"
then
- if _guix_is_dash_L
+ if _guix_is_dash_L || _guix_is_dash_m
then
_guix_complete_file
elif _guix_is_removing