aboutsummaryrefslogtreecommitdiffstats
path: root/builtins/help.def
diff options
context:
space:
mode:
authorJari Aalto <jari.aalto@cante.net>1997-06-05 14:59:13 +0000
committerJari Aalto <jari.aalto@cante.net>2009-09-12 16:46:50 +0000
commitd166f048818e10cf3799aa24a174fb22835f1acc (patch)
tree1ca27f9243900f8b236d0cde6a3862002aea9e19 /builtins/help.def
parentccc6cda312fea9f0468ee65b8f368e9653e1380b (diff)
downloadandroid_external_bash-d166f048818e10cf3799aa24a174fb22835f1acc.tar.gz
android_external_bash-d166f048818e10cf3799aa24a174fb22835f1acc.tar.bz2
android_external_bash-d166f048818e10cf3799aa24a174fb22835f1acc.zip
Imported from ../bash-2.01.tar.gz.
Diffstat (limited to 'builtins/help.def')
-rw-r--r--builtins/help.def19
1 files changed, 11 insertions, 8 deletions
diff --git a/builtins/help.def b/builtins/help.def
index e5e82d5..9c47910 100644
--- a/builtins/help.def
+++ b/builtins/help.def
@@ -46,7 +46,10 @@ $END
#include <glob/fnmatch.h>
#include <glob/glob.h>
-static void show_builtin_command_help ();
+extern void builtin_error ();
+extern void builtin_usage ();
+
+static void show_builtin_command_help ();
/* Print out a list of the known functions in the shell, and what they do.
If LIST is supplied, print out the list which matches for each pattern
@@ -59,13 +62,6 @@ help_builtin (list)
char *pattern, *name;
int plen, match_found;
- if (list == 0)
- {
- show_shell_version (0);
- show_builtin_command_help ();
- return (EXECUTION_SUCCESS);
- }
-
/* Placeholder for future options. */
reset_internal_getopt ();
while ((i = internal_getopt (list, "")) != -1)
@@ -79,6 +75,13 @@ help_builtin (list)
}
list = loptend;
+ if (list == 0)
+ {
+ show_shell_version (0);
+ show_builtin_command_help ();
+ return (EXECUTION_SUCCESS);
+ }
+
/* We should consider making `help bash' do something. */
if (glob_pattern_p (list->word->word))