* [gentoo-commits] proj/eselect:master commit in: /, misc/
2013-11-15 8:01 [gentoo-commits] proj/eselect:nolinewrap commit in: /, misc/ Ulrich Müller
@ 2013-11-15 6:21 ` Ulrich Müller
0 siblings, 0 replies; 2+ messages in thread
From: Ulrich Müller @ 2013-11-15 6:21 UTC (permalink / raw
To: gentoo-commits
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}") ;;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] proj/eselect:nolinewrap commit in: /, misc/
@ 2013-11-15 8:01 Ulrich Müller
2013-11-15 6:21 ` [gentoo-commits] proj/eselect:master " Ulrich Müller
0 siblings, 1 reply; 2+ messages in thread
From: Ulrich Müller @ 2013-11-15 8:01 UTC (permalink / raw
To: gentoo-commits
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}") ;;
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-11-15 8:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-15 8:01 [gentoo-commits] proj/eselect:nolinewrap commit in: /, misc/ Ulrich Müller
2013-11-15 6:21 ` [gentoo-commits] proj/eselect:master " Ulrich Müller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox