small mistakes in options and descriptions [patch]
Hi, None of the synopses of the 'set' command mentions the -E and -T options. The first patch corrects this. The second patch brings some texts printed by 'help' more in line with the man page: among other things it corrects a mistake in the description of 'trap' and removes a duplicate sentence from 'wait'. The third patch puts the options in some synopses and help texts in alphabetical order, again following the man page, so it becomes a little easier to find them. Benno diff -ur bash-3.2.orig/builtins/set.def bash-3.2.new/builtins/set.def --- bash-3.2.orig/builtins/set.def 2006-07-27 15:41:43.0 +0200 +++ bash-3.2.new/builtins/set.def 2006-12-11 14:25:17.0 +0100 @@ -60,7 +60,8 @@ $BUILTIN set $FUNCTION set_builtin -$SHORT_DOC set [--abefhkmnptuvxBCHP] [-o option] [arg ...] +$SHORT_DOC set [--abefhkmnptuvxBCEHPT] [-o option] [arg ...] +Switches shell attributes on or off. Available switches are: -a Mark variables which are modified or created for export. -b Notify of job termination immediately. -e Exit immediately if a command exits with a non-zero status. diff -ur bash-3.2.orig/doc/bash.1 bash-3.2.new/doc/bash.1 --- bash-3.2.orig/doc/bash.1 2006-10-03 14:54:26.0 +0200 +++ bash-3.2.new/doc/bash.1 2006-12-11 14:25:17.0 +0100 @@ -7539,7 +7539,7 @@ Any command associated with the \fBRETURN\fP trap is executed before execution resumes after the function or script. .TP -\fBset\fP [\fB\-\-abefhkmnptuvxBCHP\fP] [\fB\-o\fP \fIoption\fP] [\fIarg\fP ...] +\fBset\fP [\fB\-\-abefhkmnptuvxBCEHPT\fP] [\fB\-o\fP \fIoption\fP] [\fIarg\fP ...] Without options, the name and value of each shell variable are displayed in a format that can be reused as input for setting or resetting the currently-set variables. diff -ur bash-3.2.orig/doc/bashref.texi bash-3.2.new/doc/bashref.texi --- bash-3.2.orig/doc/bashref.texi 2006-09-28 16:25:28.0 +0200 +++ bash-3.2.new/doc/bashref.texi 2006-12-11 14:25:17.0 +0100 @@ -3935,7 +3935,7 @@ @item set @btindex set @example -set [--abefhkmnptuvxBCHP] [-o @var{option}] [EMAIL PROTECTED] @dots{}] +set [--abefhkmnptuvxBCEHPT] [-o @var{option}] [EMAIL PROTECTED] @dots{}] @end example If no options or arguments are supplied, @code{set} displays the names 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.0 +0100 +++ bash-3.2.new/builtins/declare.def 2006-12-11 14:26:23.0 +0100 @@ -90,10 +90,11 @@ $BUILTIN local $FUNCTION local_builtin -$SHORT_DOC local name[=value] ... +$SHORT_DOC local [option] name[=value] ... Create a local variable called NAME, and give it VALUE. LOCAL can only be used within a function; it makes the variable NAME have a visible scope restricted to that function and its children. +As option any of the options accepted by declare can be used. $END int local_builtin (list) diff -ur bash-3.2.orig/builtins/shopt.def bash-3.2.new/builtins/shopt.def --- bash-3.2.orig/builtins/shopt.def 2005-02-19 23:25:03.0 +0100 +++ bash-3.2.new/builtins/shopt.def 2006-12-11 14:26:23.0 +0100 @@ -23,7 +23,7 @@ $BUILTIN shopt $FUNCTION shopt_builtin -$SHORT_DOC shopt [-pqsu] [-o long-option] optname [optname...] +$SHORT_DOC shopt [-pqsu] [-o] [optname...] Toggle the values of variables controlling optional behavior. The -s flag means to enable (set) each OPTNAME; the -u flag unsets each OPTNAME. The -q flag suppresses output; the exit diff -ur bash-3.2.orig/builtins/trap.def bash-3.2.new/builtins/trap.def --- bash-3.2.orig/builtins/trap.def 2006-07-27 15:42:26.0 +0200 +++ bash-3.2.new/builtins/trap.def 2006-12-11 14:26:23.0 +0100 @@ -23,14 +23,14 @@ $BUILTIN trap $FUNCTION trap_builtin -$SHORT_DOC trap [-lp] [arg signal_spec ...] +$SHORT_DOC trap [-lp] [[arg] signal_spec ...] The command ARG is to be read and executed when the shell receives signal(s) SIGNAL_SPEC. If ARG is absent (and a single SIGNAL_SPEC is supplied) or `-', each specified signal is reset to its original value. If ARG is the null string each SIGNAL_SPEC is ignored by the shell and by the commands it invokes. If a SIGNAL_SPEC is EXIT (0) the command ARG is executed on exit from the shell. If a SIGNAL_SPEC -is DEBUG, ARG is executed after every simple command. If the`-p' option +is DEBUG, ARG is executed before every simple command. If the`-p' option is supplied then the trap commands associated with each SIGNAL_SPEC are displayed. If no arguments are supplied or if only `-p' is given, trap prints the list of commands associated with each signal. Each SIGNAL_SPEC diff -ur bash-3.2.orig/builtins/wait.def bash-3.2.new/builtins/wait.def --- bash-3.2.orig/builtins/wait.def 2006-07-28 21:13:34.0 +0200 +++ bash-3.2.new/builtins/wait.def 2006-12-11 14:26:23.0 +0100 @@ -37,8 +37,7 @@ $SHORT_DOC wait [n] Wait for the specified process and report its termina
gettextizing more skipped messages [patch]
Attached patch gettextizes a bunch of strings that were found uninternationalized while skimming through all the *.def and *.c files. The second patch does this also for siglist.c file. The third patch removes the duplication of the command name from the output of 'help', as this duplication doesn't add anything and sometimes is mildly confusing, for example for 'help :' or 'help "for (("'. Benno diff -ur bash-3.2.orig/builtins/break.def bash-3.2.new/builtins/break.def --- bash-3.2.orig/builtins/break.def 2003-12-19 23:56:38.0 +0100 +++ bash-3.2.new/builtins/break.def 2006-12-11 14:28:09.0 +0100 @@ -70,7 +70,7 @@ if (newbreak <= 0) { - sh_erange (list->word->word, "loop count"); + sh_erange (list->word->word, _("loop count")); breaking = loop_level; return (EXECUTION_FAILURE); } @@ -105,7 +105,7 @@ if (newcont <= 0) { - sh_erange (list->word->word, "loop count"); + sh_erange (list->word->word, _("loop count")); breaking = loop_level; return (EXECUTION_FAILURE); } diff -ur bash-3.2.orig/builtins/common.c bash-3.2.new/builtins/common.c --- bash-3.2.orig/builtins/common.c 2006-07-27 15:39:51.0 +0200 +++ bash-3.2.new/builtins/common.c 2006-12-11 14:28:09.0 +0100 @@ -100,7 +100,7 @@ fprintf (stderr, "%s: ", name); if (interactive_shell == 0) -fprintf (stderr, "line %d: ", executing_line_number ()); +fprintf (stderr, _("line %d: "), executing_line_number ()); if (this_command_name && *this_command_name) fprintf (stderr, "%s: ", this_command_name); @@ -117,7 +117,7 @@ builtin_usage () { if (this_command_name && *this_command_name) -fprintf (stderr, "%s: usage: ", this_command_name); +fprintf (stderr, _("%s: usage: "), this_command_name); fprintf (stderr, "%s\n", current_builtin->short_doc); fflush (stderr); } diff -ur bash-3.2.orig/builtins/evalfile.c bash-3.2.new/builtins/evalfile.c --- bash-3.2.orig/builtins/evalfile.c 2006-07-28 03:41:43.0 +0200 +++ bash-3.2.new/builtins/evalfile.c 2006-12-11 14:28:09.0 +0100 @@ -171,7 +171,7 @@ check_binary_file (string, (result > 80) ? 80 : result)) { free (string); - (*errfunc) ("%s: cannot execute binary file", filename); + (*errfunc) (_("%s: cannot execute binary file"), filename); return ((flags & FEVAL_BUILTIN) ? EX_BINARY_FILE : -1); } diff -ur bash-3.2.orig/builtins/exit.def bash-3.2.new/builtins/exit.def --- bash-3.2.orig/builtins/exit.def 2005-02-11 17:46:55.0 +0100 +++ bash-3.2.new/builtins/exit.def 2006-12-11 14:28:09.0 +0100 @@ -60,7 +60,7 @@ { if (interactive) { - fprintf (stderr, login_shell ? "logout\n" : "exit\n"); + fprintf (stderr, login_shell ? _("logout\n") : _("exit\n")); fflush (stderr); } diff -ur bash-3.2.orig/builtins/fg_bg.def bash-3.2.new/builtins/fg_bg.def --- bash-3.2.orig/builtins/fg_bg.def 2005-08-24 23:18:52.0 +0200 +++ bash-3.2.new/builtins/fg_bg.def 2006-12-11 14:28:09.0 +0100 @@ -137,7 +137,7 @@ if (INVALID_JOB (job)) { if (job != DUP_JOB) - sh_badjob (list ? list->word->word : "current"); + sh_badjob (list ? list->word->word : _("current")); goto failure; } diff -ur bash-3.2.orig/builtins/hash.def bash-3.2.new/builtins/hash.def --- bash-3.2.orig/builtins/hash.def 2006-02-21 20:59:45.0 +0100 +++ bash-3.2.new/builtins/hash.def 2006-12-11 14:28:09.0 +0100 @@ -233,7 +233,7 @@ return (0); if (fmt == 0) -printf ("hits\tcommand\n"); +printf (_("hits\tcommand\n")); hash_walk (hashed_filenames, fmt ? print_portable_hash_info : print_hash_info); return (1); } diff -ur bash-3.2.orig/builtins/jobs.def bash-3.2.new/builtins/jobs.def --- bash-3.2.orig/builtins/jobs.def 2005-02-11 17:47:09.0 +0100 +++ bash-3.2.new/builtins/jobs.def 2006-12-11 14:28:09.0 +0100 @@ -261,7 +261,7 @@ if (job == NO_JOB || jobs == 0 || INVALID_JOB (job)) { - sh_badjob (list ? list->word->word : "current"); + sh_badjob (list ? list->word->word : _("current")); retval = EXECUTION_FAILURE; } else if (nohup_only) diff -ur bash-3.2.orig/builtins/type.def bash-3.2.new/builtins/type.def --- bash-3.2.orig/builtins/type.def 2005-08-24 14:38:34.0 +0200 +++ bash-3.2.new/builtins/type.def 2006-12-11 14:28:09.0 +0100 @@ -227,7 +227,7 @@ if (((dflags & CDESC_FORCE_PATH) == 0) && expand_aliases && (alias = find_alias (command))) { if (dflags & CDESC_TYPE) - puts ("alias"); + puts (_("alias")); else if (dflags & CDESC_SHORTDESC) printf (_("%s is aliased to `%s'\n"), command, alias->value); else if (dflags & CDESC_REUSABLE) @@ -248,7 +248,7 @@ if (((dflags & CDESC_FORCE_PATH) == 0) && (i = find_reserved_word (command)) >= 0) { if (dflags & CDESC_TYPE) - puts ("keyword"); + puts (_("keyword")); else if (dflags & CDESC_SHORTDESC) p
Re: the mystery values of $?: 147 and 148
> Here at Clodsburger Research, we discovered the mystery values, 147 > and 148. Please document them on the man page. "The return value of a simple command is its exit status, or 128+n if the command is terminated by signal n." You can quibble about whether `stopped', `suspended' and `terminated' all mean the same thing, but their effect in this context is clearly identical. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer Live Strong. Chet Ramey, ITS, CWRU[EMAIL PROTECTED]http://tiswww.tis.case.edu/~chet/ ___ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash
Re: "for i do ..." broken with --enable-minimal-config
[EMAIL PROTECTED] wrote: > Configuration Information [Automatically generated, do not change]: > Machine: i686 > OS: linux-gnu > Compiler: gcc > Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i686' > -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i686-pc-linux-gnu' > -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/local/share/locale' -DPACKAGE='bash' > -DSHELL -DHAVE_CONFIG_H -I. -I. -I./include -I./lib -g -O2 > uname output: Linux boopsie.dyndns.org 2.6.17.7 #6 Thu Nov 30 01:23:17 PST > 2006 i686 unknown unknown GNU/Linux > Machine Type: i686-pc-linux-gnu > > Bash Version: 3.2 > Patch Level: 5 > Release Status: release > > Description: > The "for i do ..." construct (to loop over $@ by default) does not > work when bash is compiled with --enable-minimal-config . I cannot reproduce it. Are you sure you're not running into the bison problem described in item 17 of NOTES? The parser gets rebuilt when --enable-minimal-config is used -- chances are good that when you built bash using the default options, it used the (working) versions of y.tab.c and y.tab.h shipped in the bash-3.2 tarball. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer Live Strong. No day but today. Chet Ramey, ITS, CWRU[EMAIL PROTECTED]http://cnswww.cns.cwru.edu/~chet/ ___ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash
Re: --prefix=FOO ignored when --disable-nls given
> Machine Type: i686-pc-linux-gnu > > Bash Version: 3.2 > Patch Level: 5 > Release Status: release > > Description: > When compiling bash and running "./configure", the directory specified by > "--prefix=FOO" is ignored when "--disable-nls" is given at the same time. > $prefix then defaults to "/usr/local". It doesn't seem to matter what > order these two flags are given on the command line. I can't reproduce it: $ bash ~/src/bash/bash-3.2-patched/configure --disable-nls --prefix=/home/foo checking build system type... i686-pc-linux-gnu checking host system type... i686-pc-linux-gnu [...] $ grep prefix Makefile prefix = /home/foo [...] $ gmake -n install [...] /bin/sh /homes/chet/src/bash/bash-3.2-patched/support/mkinstalldirs /home/foo/bin /bin/sh /homes/chet/src/bash/bash-3.2-patched/support/mkinstalldirs /home/foo/man/man1 /bin/sh /homes/chet/src/bash/bash-3.2-patched/support/mkinstalldirs /home/foo/info [...] This indicates that `make install' is using /home/foo for $prefix. It might be something in your environment that is changing the default. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer Live Strong. Chet Ramey, ITS, CWRU[EMAIL PROTECTED]http://tiswww.tis.case.edu/~chet/ ___ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash