summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCiaran McCreesh <ciaranm@gentoo.org>2005-05-08 21:18:50 +0000
committerCiaran McCreesh <ciaranm@gentoo.org>2005-05-08 21:18:50 +0000
commit28fb3b1fc53e6205766c74b98d21a7058190502a (patch)
tree8230986bb52f8bc7e7146e5f1421f3674bb4bafd
parentshow extra usage message if appropriate (diff)
downloadeselect-28fb3b1fc53e6205766c74b98d21a7058190502a.tar.gz
eselect-28fb3b1fc53e6205766c74b98d21a7058190502a.tar.bz2
eselect-28fb3b1fc53e6205766c74b98d21a7058190502a.zip
better usage handling
svn path=/branches/ciaranm/; revision=76
-rw-r--r--config/libs/default.eclectic.in16
1 files changed, 11 insertions, 5 deletions
diff --git a/config/libs/default.eclectic.in b/config/libs/default.eclectic.in
index 4933be9..f141696 100644
--- a/config/libs/default.eclectic.in
+++ b/config/libs/default.eclectic.in
@@ -26,6 +26,15 @@ describe_usage() {
}
do_usage() {
+ show_usage_message
+ if is_function show_extra_help_text ; then
+ echo
+ echo "Additional help is available via the 'help' action."
+ fi
+ true
+}
+
+show_usage_message() {
echo "Usage: ${ECLECTIC_COMMAND} <action> <options>"
echo
@@ -55,10 +64,7 @@ do_usage() {
;;
esac
done
- if is_function show_extra_help_text ; then
- echo
- echo "Additional help is available via the 'help' action."
- fi
+ true
}
describe_version() {
@@ -75,7 +81,7 @@ describe_help() {
do_help() {
echo "${DESCRIPTION}"
- do_usage
+ show_usage_message
if is_function show_extra_help_text ; then
echo
show_extra_help_text