Hi,

Attached patch fixes the mistakes I've found so far in the texts 
printed by the 'help' command.  It adds a missing percent sign to 
the synopsis of '%', corrects the description of the -p option of 
'time', makes 'file' an optional argument in the synopsis of 'exec' 
and removes a duplicate word there; and rearranges the whole text 
describing 'declare', putting -f and -F together with option -p and 
not with the attribute-setting parameters, as -f and -F cannot take 
+ instead of - like the others.

By the way, it seems that \n in the TIMEFORMAT variable does not 
work correctly: a literal \n is printed instead of a newline:

$ TIMEFORMAT="used  : %U\nsystem: %S"
$ time help time >/dev/null
used  : 0.001\nsystem: 0.000

One needs to use an actual line feed to get a newline in there:

$ TIMEFORMAT="used  : %U
system: %S"
$ time help time >/dev/null
used  : 0.000
system: 0.001

Benno
diff -ur bash-3.2.orig/builtins/reserved.def bash-3.2.new/builtins/reserved.def
--- bash-3.2.orig/builtins/reserved.def	2006-03-07 20:30:00.000000000 +0100
+++ bash-3.2.new/builtins/reserved.def	2006-11-25 23:19:54.000000000 +0100
@@ -110,7 +110,7 @@
 
 $BUILTIN %
 $DOCNAME fg_percent
-$SHORT_DOC JOB_SPEC [&]
+$SHORT_DOC %job_spec [&]
 Equivalent to the JOB_SPEC argument to the `fg' command.  Resume a
 stopped or background job.  JOB_SPEC can specify either a job name
 or a job number.  Following JOB_SPEC with a `&' places the job in
diff -ur bash-3.2.orig/builtins/reserved.def bash-3.2.new/builtins/reserved.def
--- bash-3.2.orig/builtins/reserved.def	2006-03-07 20:30:00.000000000 +0100
+++ bash-3.2.new/builtins/reserved.def	2006-11-28 23:25:38.000000000 +0100
@@ -60,9 +60,9 @@
 $SHORT_DOC time [-p] PIPELINE
 Execute PIPELINE and print a summary of the real time, user CPU time,
 and system CPU time spent executing PIPELINE when it terminates.
-The return status is the return status of PIPELINE.  The `-p' option
-prints the timing summary in a slightly different format.  This uses
-the value of the TIMEFORMAT variable as the output format.
+The return status is the return status of PIPELINE.  The output can
+be formatted via the variable TIMEFORMAT.  The -p option ignores this
+variable and prints the timing summary in the portable POSIX format.
 $END
 
 $BUILTIN case
diff -ur bash-3.2.orig/builtins/exec.def bash-3.2.new/builtins/exec.def
--- bash-3.2.orig/builtins/exec.def	2005-06-01 22:44:58.000000000 +0200
+++ bash-3.2.new/builtins/exec.def	2006-11-28 23:29:00.000000000 +0100
@@ -23,13 +23,13 @@
 
 $BUILTIN exec
 $FUNCTION exec_builtin
-$SHORT_DOC exec [-cl] [-a name] file [redirection ...]
-Exec FILE, replacing this shell with the specified program.
+$SHORT_DOC exec [-cl] [-a name] [file] [redirection ...]
+Executes FILE, replacing this shell with the specified program.
 If FILE is not specified, the redirections take effect in this
 shell.  If the first argument is `-l', then place a dash in the
 zeroth arg passed to FILE, as login does.  If the `-c' option
 is supplied, FILE is executed with a null environment.  The `-a'
-option means to make set argv[0] of the executed process to NAME.
+option means to set argv[0] of the executed process to NAME.
 If the file cannot be executed and the shell is not interactive,
 then the shell exits, unless the shell option `execfail' is set.
 $END
diff -ur bash-3.2.orig/builtins/declare.def bash-3.2.new/builtins/declare.def
--- bash-3.2.orig/builtins/declare.def	2006-01-29 01:34:11.000000000 +0100
+++ bash-3.2.new/builtins/declare.def	2006-11-28 23:44:04.000000000 +0100
@@ -23,31 +23,26 @@
 
 $BUILTIN declare
 $FUNCTION declare_builtin
-$SHORT_DOC declare [-afFirtx] [-p] [name[=value] ...]
+$SHORT_DOC declare [-fFp] [-airtx] [name[=value] ...]
 Declare variables and/or give them attributes.  If no NAMEs are
-given, then display the values of variables instead.  The -p option
-will display the attributes and values of each NAME.
-
-The flags are:
+given, then display the values of variables instead; the -f option
+restricts this display to functions; and the -F option restricts it
+to only the functions names (plus line number and source file name
+when debugging).  The -p option displays the attributes and values
+of each NAME.
 
+Setting attributes:
   -a	to make NAMEs arrays (if supported)
-  -f	to select from among function names only
-  -F	to display function names (and line number and source file name if
-	debugging) without definitions 
   -i	to make NAMEs have the `integer' attribute
   -r	to make NAMEs readonly
   -t	to make NAMEs have the `trace' attribute
   -x	to make NAMEs export
 
+Using `+' instead of `-' turns off the given attribute instead.  When
+used in a function, it makes NAMEs local, as with the `local' command.
+
 Variables with the integer attribute have arithmetic evaluation (see
 `let') done when the variable is assigned to.
-
-When displaying values of variables, -f displays a function's name
-and definition.  The -F option restricts the display to function
-name only.
-
-Using `+' instead of `-' turns off the given attribute instead.  When
-used in a function, makes NAMEs local, as with the `local' command.
 $END
 
 $BUILTIN typeset
_______________________________________________
Bug-bash mailing list
Bug-bash@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-bash

Reply via email to