aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2011-09-18 10:02:55 +0000
committerUlrich Müller <ulm@gentoo.org>2011-09-18 10:02:55 +0000
commite5976bc74a490e680ab803939931aee3f41b91f4 (patch)
treed10a44e2488e7e8bf7e5662cef9e736d0933e807
parentUpdate version to 1.2.17. (diff)
downloadeselect-e5976bc74a490e680ab803939931aee3f41b91f4.tar.gz
eselect-e5976bc74a490e680ab803939931aee3f41b91f4.tar.bz2
eselect-e5976bc74a490e680ab803939931aee3f41b91f4.zip
Merge some changes from trunk.
svn path=/branches/branch-1.2.x/; revision=840
-rw-r--r--ChangeLog5
-rw-r--r--NEWS3
-rw-r--r--libs/default.eselect.in21
3 files changed, 20 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index d964915..7af7f27 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-09-18 Ulrich Mueller <ulm@gentoo.org>
+
+ * libs/default.eselect.in (show_usage_message): Don't set IFS when
+ calling describe_*_options. Fixes bug 382693.
+
2011-09-04 Ulrich Mueller <ulm@gentoo.org>
* configure.ac: Update version to 1.2.17.
diff --git a/NEWS b/NEWS
index 58e7855..409e7a0 100644
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,9 @@
This file contains a summary of changes in released versions. Please read the
ChangeLog file for a more detailed listing of changes/bug fixes.
+ Bug fixes:
+ - Fixed bug #382693: IFS handling in default usage action.
+
1.2.17:
Bug fixes:
- Fixed bug #363481: Don't search for completion files in current working
diff --git a/libs/default.eselect.in b/libs/default.eselect.in
index ef59056..4e3c98e 100644
--- a/libs/default.eselect.in
+++ b/libs/default.eselect.in
@@ -28,13 +28,15 @@ do_usage() {
}
show_usage_message() {
+ local action
+
echo "Usage: ${ESELECT_COMMAND} <action> <options>"
echo
write_list_start "Standard actions:"
- for action in "help" "usage" "version" ; do
+ for action in help usage version; do
local desc=""
- is_function "describe_${action}" && desc=$(describe_${action} )
+ is_function "describe_${action}" && desc=$(describe_${action})
write_kv_list_entry "${action}" "${desc:-(no description)}"
done
@@ -45,16 +47,16 @@ show_usage_message() {
for action in $(set | \
sed -n -e '/^do_\S\+ ()\s*$/s/^do_\(\S\+\).*/\1/p' | \
grep -v 'action' | \
- sort ) ; do
+ sort); do
case "${action}" in
help|usage|version)
continue
;;
?*)
- local desc="" line="" ifs_save="${IFS}" action_text=""
- is_function "describe_${action}" && desc=$(describe_${action} )
+ local desc="" ifs_save="${IFS}" action_text line options
+ is_function "describe_${action}" && desc=$(describe_${action})
- if is_function "describe_${action}_parameters" ; then
+ if is_function "describe_${action}_parameters"; then
action_text="${action} $(describe_${action}_parameters)"
else
action_text="${action}"
@@ -62,9 +64,10 @@ show_usage_message() {
write_kv_list_entry "${action_text}" "${desc:-(no description)}"
- if is_function "describe_${action}_options" ; then
+ if is_function "describe_${action}_options"; then
+ options=$(describe_${action}_options)
IFS=$'\n'
- for line in $(describe_${action}_options) ; do
+ for line in ${options}; do
write_kv_list_entry -p \
" ${line%%*( ):*}" \
" ${line##+([^:]):*( )}"
@@ -93,7 +96,7 @@ do_help() {
set_output_mode default
echo "${DESCRIPTION}"
show_usage_message
- if is_function show_extra_help_text ; then
+ if is_function show_extra_help_text; then
echo
show_extra_help_text
fi