public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Ulrich Müller" <ulm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/eselect:nolinewrap commit in: /, misc/
Date: Fri, 15 Nov 2013 08:01:58 +0000 (UTC)	[thread overview]
Message-ID: <1384496345.14c4d2723db87329d23f40a7ed67cb44f9ced7fd.ulm@gentoo> (raw)

commit:     14c4d2723db87329d23f40a7ed67cb44f9ced7fd
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Fri Nov 15 06:19:05 2013 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Fri Nov 15 06:19:05 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/eselect.git;a=commit;h=14c4d272

Enable bash completion also for an empty list of words.

* misc/eselect.bashcomp (_eselect): Suggest possible completions
also for an empty list of words, i.e. when the user has not typed
any parameters yet.

---
 ChangeLog             | 6 ++++++
 misc/eselect.bashcomp | 6 +++---
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 89fe111..16e368f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2013-11-15  Ulrich Müller  <ulm@gentoo.org>
+
+	* misc/eselect.bashcomp (_eselect): Suggest possible completions
+	also for an empty list of words, i.e. when the user has not typed
+	any parameters yet.
+
 2013-11-14  Michael Marineau  <mike@marineau.org>
 
 	* modules/profile.eselect (set_symlink): Silence profile symlink

diff --git a/misc/eselect.bashcomp b/misc/eselect.bashcomp
index 30972fe..0ffe628 100644
--- a/misc/eselect.bashcomp
+++ b/misc/eselect.bashcomp
@@ -13,18 +13,18 @@ _eselect() {
     sedcmd2='s/^  \([[:alnum:]-][[:alnum:]_-]*\)[[:space:],].*$/\1/p'
     sedcmd3='s/^  \[[[:digit:]][[:digit:]]*\] *\([[:graph:]]*\).*$/\1/p'
 
-    set - "${COMP_WORDS[@]:1}"
+    set -- "${COMP_WORDS[@]:1}"
     # skip global options
     while [[ $# -gt 1 && $1 == -* ]]; do
         shift
     done
     # skip any subaction options
     while [[ $# -gt 3 && $3 == -* ]]; do
-        set - "${@:1:2}" "${@:4}"
+        set -- "${@:1:2}" "${@:4}"
     done
 
     case $# in
-        1) possibles="${options} $(eselect --brief modules list 2>/dev/null)"
+        0|1) possibles="${options} $(eselect --brief modules list 2>/dev/null)"
             ;;
         2) possibles=$(eselect --brief "$1" usage 2>/dev/null \
             | sed -n -e "${sedcmd2}") ;;


WARNING: multiple messages have this Message-ID (diff)
From: "Ulrich Müller" <ulm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/eselect:master commit in: /, misc/
Date: Fri, 15 Nov 2013 06:21:05 +0000 (UTC)	[thread overview]
Message-ID: <1384496345.14c4d2723db87329d23f40a7ed67cb44f9ced7fd.ulm@gentoo> (raw)
Message-ID: <20131115062105.0Cxkdz63x6tmjxoALW3gaPQ9ysTl6u7PJA_Ctd0VyAM@z> (raw)

commit:     14c4d2723db87329d23f40a7ed67cb44f9ced7fd
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Fri Nov 15 06:19:05 2013 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Fri Nov 15 06:19:05 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/eselect.git;a=commit;h=14c4d272

Enable bash completion also for an empty list of words.

* misc/eselect.bashcomp (_eselect): Suggest possible completions
also for an empty list of words, i.e. when the user has not typed
any parameters yet.

---
 ChangeLog             | 6 ++++++
 misc/eselect.bashcomp | 6 +++---
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 89fe111..16e368f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2013-11-15  Ulrich Müller  <ulm@gentoo.org>
+
+	* misc/eselect.bashcomp (_eselect): Suggest possible completions
+	also for an empty list of words, i.e. when the user has not typed
+	any parameters yet.
+
 2013-11-14  Michael Marineau  <mike@marineau.org>
 
 	* modules/profile.eselect (set_symlink): Silence profile symlink

diff --git a/misc/eselect.bashcomp b/misc/eselect.bashcomp
index 30972fe..0ffe628 100644
--- a/misc/eselect.bashcomp
+++ b/misc/eselect.bashcomp
@@ -13,18 +13,18 @@ _eselect() {
     sedcmd2='s/^  \([[:alnum:]-][[:alnum:]_-]*\)[[:space:],].*$/\1/p'
     sedcmd3='s/^  \[[[:digit:]][[:digit:]]*\] *\([[:graph:]]*\).*$/\1/p'
 
-    set - "${COMP_WORDS[@]:1}"
+    set -- "${COMP_WORDS[@]:1}"
     # skip global options
     while [[ $# -gt 1 && $1 == -* ]]; do
         shift
     done
     # skip any subaction options
     while [[ $# -gt 3 && $3 == -* ]]; do
-        set - "${@:1:2}" "${@:4}"
+        set -- "${@:1:2}" "${@:4}"
     done
 
     case $# in
-        1) possibles="${options} $(eselect --brief modules list 2>/dev/null)"
+        0|1) possibles="${options} $(eselect --brief modules list 2>/dev/null)"
             ;;
         2) possibles=$(eselect --brief "$1" usage 2>/dev/null \
             | sed -n -e "${sedcmd2}") ;;


             reply	other threads:[~2013-11-15  8:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-15  8:01 Ulrich Müller [this message]
2013-11-15  6:21 ` [gentoo-commits] proj/eselect:master commit in: /, misc/ Ulrich Müller

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=1384496345.14c4d2723db87329d23f40a7ed67cb44f9ced7fd.ulm@gentoo \
    --to=ulm@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox