From: Oleg Pykhalov <go.wigust@gmail.com>
To: 30495@debbugs.gnu.org
Subject: [bug#30495] [PATCH] bash completion: Complete files names after 'guix package -m'.
Date: Sat, 17 Feb 2018 12:07:38 +0300 [thread overview]
Message-ID: <20180217090738.6812-1-go.wigust@gmail.com> (raw)
* etc/completion/bash/guix (_guix_is_dash_L): Replace with
‘_guix_is_dash_L_or_m’.
(_guix_complete): Add this.
---
etc/completion/bash/guix | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/etc/completion/bash/guix b/etc/completion/bash/guix
index 6b84193db..286c4f1c5 100644
--- a/etc/completion/bash/guix
+++ b/etc/completion/bash/guix
@@ -97,9 +97,10 @@ _guix_is_removing ()
$result
}
-_guix_is_dash_L ()
+_guix_is_dash_L_or_m ()
{
- [ "${COMP_WORDS[$COMP_CWORD - 1]}" = "-L" ] \
+ comp_words_minus_1="${COMP_WORDS[$COMP_CWORD - 1]}"
+ [ "$comp_words_minus_1" = "-L" ] || [ "$comp_words_minus_1" = "-m" ] \
|| { case "${COMP_WORDS[$COMP_CWORD]}" in
--load-path=*) true;;
*) false;;
@@ -149,7 +150,7 @@ _guix_complete ()
*)
if _guix_is_command "package"
then
- if _guix_is_dash_L
+ if _guix_is_dash_L_or_m
then
_guix_complete_file
elif _guix_is_removing
--
2.16.1
next reply other threads:[~2018-02-17 9:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-17 9:07 Oleg Pykhalov [this message]
2018-02-17 15:45 ` [bug#30495] [PATCH] bash completion: Complete files names after 'guix package -m' Marius Bakke
2018-02-17 16:03 ` Oleg Pykhalov
2018-02-17 16:14 ` Marius Bakke
2018-02-17 19:25 ` bug#30495: " Oleg Pykhalov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180217090738.6812-1-go.wigust@gmail.com \
--to=go.wigust@gmail.com \
--cc=30495@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.