From: Chet Ramey Date: Sat, 3 Dec 2011 18:34:30 +0000 (-0500) Subject: commit bash-20040803 snapshot X-Git-Tag: bash-3.1-alpha~52 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8a9c66f622d6e5d858e929da8b150fb6db6b4303;p=thirdparty%2Fbash.git commit bash-20040803 snapshot --- diff --git a/CWRU/CWRU.chlog b/CWRU/CWRU.chlog index 360cd5839..c4f732b8f 100644 --- a/CWRU/CWRU.chlog +++ b/CWRU/CWRU.chlog @@ -9793,3 +9793,26 @@ execute_cmd.c - force extended_glob to 1 before calling binary_test in execute_cond_node so that the right extended pattern matching gets performed + + 8/3 + --- +braces.c + - make sure lhs[0] and rhs[0] are cast to `unsigned char' so chars + with values > 128 are handled correctly + +builtins/printf.def + - change bexpand() and printstr() to handle strings with a leading + '\0' whose length is non-zero, since that's valid input for the + `%b' format specifier + +subst.c + - fix a couple of instances of find_variable that didn't check the + result for an invisible variable + +variables.c + - BASH_ARGC, BASH_ARGV, BASH_SOURCE, BASH_LINENO no longer created as + invisible vars + +pcomplete.c + - make sure COMP_WORDS is not invisible when bind_comp_words returns + - ditto for COMPREPLY in gen_shell_function_matches diff --git a/CWRU/CWRU.chlog~ b/CWRU/CWRU.chlog~ index 3380cc7b0..7bab23254 100644 --- a/CWRU/CWRU.chlog~ +++ b/CWRU/CWRU.chlog~ @@ -9788,3 +9788,31 @@ builtins/type.def doc/bashref.texi - add note to POSIX Mode section describing behavior of type and command when finding a non-executable file + +execute_cmd.c + - force extended_glob to 1 before calling binary_test in + execute_cond_node so that the right extended pattern matching gets + performed + + 8/3 + --- +braces.c + - make sure lhs[0] and rhs[0] are cast to `unsigned char' so chars + with values > 128 are handled correctly + +builtins/printf.def + - change bexpand() and printstr() to handle strings with a leading + '\0' whose length is non-zero, since that's valid input for the + `%b' format specifier + +subst.c + - fix a couple of instances of find_variable that didn't check the + result for an invisible variable + +variables.c + - BASH_ARGC, BASH_ARGV, BASH_SOURCE, BASH_LINENO no longer created as + invisible vars + +pcomplete.c + - make sure COMP_WORDS is not invisible when bind_comp_words returns + - ditto for COMPREPLY in gen_shell_function_completions diff --git a/arrayfunc.c~ b/arrayfunc.c~ index a00f17f86..a17386501 100644 --- a/arrayfunc.c~ +++ b/arrayfunc.c~ @@ -611,7 +611,11 @@ array_variable_part (s, subp, lenp) var = find_variable (t); free (t); +#if 1 + return (var == 0 || invisible_p (var)) ? (SHELL_VAR *)0 : var; +#else return var; +#endif } /* Return a string containing the elements in the array and subscript diff --git a/braces.c b/braces.c index 0fb9b9d71..8ebfb4fab 100644 --- a/braces.c +++ b/braces.c @@ -340,8 +340,8 @@ expand_seqterm (text, tlen) if (lhs_t == ST_CHAR) { - lhs_v = lhs[0]; - rhs_v = rhs[0]; + lhs_v = (unsigned char)lhs[0]; + rhs_v = (unsigned char)rhs[0]; } else { diff --git a/builtins/printf.def b/builtins/printf.def index 9b377a930..d9719b82a 100644 --- a/builtins/printf.def +++ b/builtins/printf.def @@ -443,7 +443,11 @@ printstr (fmt, string, len, fieldwidth, precision) int padlen, nc, ljust, i; int fw, pr; /* fieldwidth and precision */ +#if 0 if (string == 0 || *string == '\0') +#else + if (string == 0 || len == 0) +#endif return; #if 0 @@ -644,7 +648,11 @@ bexpand (string, len, sawc, lenp) int temp; char *ret, *r, *s, c; +#if 0 if (string == 0 || *string == '\0') +#else + if (string == 0 || len == 0) +#endif { if (sawc) *sawc = 0; diff --git a/doc/bashref.aux b/doc/bashref.aux index 232ba2b4f..eb0bc7c62 100644 --- a/doc/bashref.aux +++ b/doc/bashref.aux @@ -209,161 +209,161 @@ @xrdef{Bash POSIX Mode-pg}{76} @xrdef{Bash POSIX Mode-snt}{Section@tie 6.11} @xrdef{Job Control-title}{Job Control} -@xrdef{Job Control-pg}{79} +@xrdef{Job Control-pg}{81} @xrdef{Job Control-snt}{Chapter@tie 7} @xrdef{Job Control Basics-title}{Job Control Basics} -@xrdef{Job Control Basics-pg}{79} +@xrdef{Job Control Basics-pg}{81} @xrdef{Job Control Basics-snt}{Section@tie 7.1} @xrdef{Job Control Builtins-title}{Job Control Builtins} -@xrdef{Job Control Builtins-pg}{80} +@xrdef{Job Control Builtins-pg}{82} @xrdef{Job Control Builtins-snt}{Section@tie 7.2} @xrdef{Job Control Variables-title}{Job Control Variables} -@xrdef{Job Control Variables-pg}{82} +@xrdef{Job Control Variables-pg}{84} @xrdef{Job Control Variables-snt}{Section@tie 7.3} @xrdef{Command Line Editing-title}{Command Line Editing} -@xrdef{Command Line Editing-pg}{83} +@xrdef{Command Line Editing-pg}{85} @xrdef{Command Line Editing-snt}{Chapter@tie 8} @xrdef{Introduction and Notation-title}{Introduction to Line Editing} -@xrdef{Introduction and Notation-pg}{83} +@xrdef{Introduction and Notation-pg}{85} @xrdef{Introduction and Notation-snt}{Section@tie 8.1} @xrdef{Readline Interaction-title}{Readline Interaction} -@xrdef{Readline Interaction-pg}{83} +@xrdef{Readline Interaction-pg}{85} @xrdef{Readline Interaction-snt}{Section@tie 8.2} @xrdef{Readline Bare Essentials-title}{Readline Bare Essentials} -@xrdef{Readline Bare Essentials-pg}{83} +@xrdef{Readline Bare Essentials-pg}{85} @xrdef{Readline Bare Essentials-snt}{Section@tie 8.2.1} @xrdef{Readline Movement Commands-title}{Readline Movement Commands} -@xrdef{Readline Movement Commands-pg}{84} +@xrdef{Readline Movement Commands-pg}{86} @xrdef{Readline Movement Commands-snt}{Section@tie 8.2.2} @xrdef{Readline Killing Commands-title}{Readline Killing Commands} -@xrdef{Readline Killing Commands-pg}{85} +@xrdef{Readline Killing Commands-pg}{87} @xrdef{Readline Killing Commands-snt}{Section@tie 8.2.3} @xrdef{Readline Arguments-title}{Readline Arguments} -@xrdef{Readline Arguments-pg}{85} +@xrdef{Readline Arguments-pg}{87} @xrdef{Readline Arguments-snt}{Section@tie 8.2.4} @xrdef{Searching-title}{Searching for Commands in the History} -@xrdef{Searching-pg}{86} +@xrdef{Searching-pg}{88} @xrdef{Searching-snt}{Section@tie 8.2.5} @xrdef{Readline Init File-title}{Readline Init File} -@xrdef{Readline Init File-pg}{86} +@xrdef{Readline Init File-pg}{88} @xrdef{Readline Init File-snt}{Section@tie 8.3} @xrdef{Readline Init File Syntax-title}{Readline Init File Syntax} -@xrdef{Readline Init File Syntax-pg}{86} +@xrdef{Readline Init File Syntax-pg}{88} @xrdef{Readline Init File Syntax-snt}{Section@tie 8.3.1} @xrdef{Conditional Init Constructs-title}{Conditional Init Constructs} -@xrdef{Conditional Init Constructs-pg}{91} +@xrdef{Conditional Init Constructs-pg}{93} @xrdef{Conditional Init Constructs-snt}{Section@tie 8.3.2} @xrdef{Sample Init File-title}{Sample Init File} -@xrdef{Sample Init File-pg}{92} +@xrdef{Sample Init File-pg}{94} @xrdef{Sample Init File-snt}{Section@tie 8.3.3} @xrdef{Bindable Readline Commands-title}{Bindable Readline Commands} -@xrdef{Bindable Readline Commands-pg}{95} +@xrdef{Bindable Readline Commands-pg}{97} @xrdef{Bindable Readline Commands-snt}{Section@tie 8.4} @xrdef{Commands For Moving-title}{Commands For Moving} -@xrdef{Commands For Moving-pg}{95} +@xrdef{Commands For Moving-pg}{97} @xrdef{Commands For Moving-snt}{Section@tie 8.4.1} @xrdef{Commands For History-title}{Commands For Manipulating The History} -@xrdef{Commands For History-pg}{95} +@xrdef{Commands For History-pg}{97} @xrdef{Commands For History-snt}{Section@tie 8.4.2} @xrdef{Commands For Text-title}{Commands For Changing Text} -@xrdef{Commands For Text-pg}{97} +@xrdef{Commands For Text-pg}{99} @xrdef{Commands For Text-snt}{Section@tie 8.4.3} @xrdef{Commands For Killing-title}{Killing And Yanking} -@xrdef{Commands For Killing-pg}{98} +@xrdef{Commands For Killing-pg}{100} @xrdef{Commands For Killing-snt}{Section@tie 8.4.4} @xrdef{Numeric Arguments-title}{Specifying Numeric Arguments} -@xrdef{Numeric Arguments-pg}{99} +@xrdef{Numeric Arguments-pg}{101} @xrdef{Numeric Arguments-snt}{Section@tie 8.4.5} @xrdef{Commands For Completion-title}{Letting Readline Type For You} -@xrdef{Commands For Completion-pg}{99} +@xrdef{Commands For Completion-pg}{101} @xrdef{Commands For Completion-snt}{Section@tie 8.4.6} @xrdef{Keyboard Macros-title}{Keyboard Macros} -@xrdef{Keyboard Macros-pg}{100} +@xrdef{Keyboard Macros-pg}{102} @xrdef{Keyboard Macros-snt}{Section@tie 8.4.7} @xrdef{Miscellaneous Commands-title}{Some Miscellaneous Commands} -@xrdef{Miscellaneous Commands-pg}{101} +@xrdef{Miscellaneous Commands-pg}{103} @xrdef{Miscellaneous Commands-snt}{Section@tie 8.4.8} @xrdef{Readline vi Mode-title}{Readline vi Mode} -@xrdef{Readline vi Mode-pg}{103} +@xrdef{Readline vi Mode-pg}{105} @xrdef{Readline vi Mode-snt}{Section@tie 8.5} @xrdef{Programmable Completion-title}{Programmable Completion} -@xrdef{Programmable Completion-pg}{103} +@xrdef{Programmable Completion-pg}{105} @xrdef{Programmable Completion-snt}{Section@tie 8.6} @xrdef{Programmable Completion Builtins-title}{Programmable Completion Builtins} -@xrdef{Programmable Completion Builtins-pg}{105} +@xrdef{Programmable Completion Builtins-pg}{107} @xrdef{Programmable Completion Builtins-snt}{Section@tie 8.7} @xrdef{Using History Interactively-title}{Using History Interactively} -@xrdef{Using History Interactively-pg}{109} +@xrdef{Using History Interactively-pg}{111} @xrdef{Using History Interactively-snt}{Chapter@tie 9} @xrdef{Bash History Facilities-title}{Bash History Facilities} -@xrdef{Bash History Facilities-pg}{109} +@xrdef{Bash History Facilities-pg}{111} @xrdef{Bash History Facilities-snt}{Section@tie 9.1} @xrdef{Bash History Builtins-title}{Bash History Builtins} -@xrdef{Bash History Builtins-pg}{109} +@xrdef{Bash History Builtins-pg}{111} @xrdef{Bash History Builtins-snt}{Section@tie 9.2} @xrdef{History Interaction-title}{History Expansion} -@xrdef{History Interaction-pg}{111} +@xrdef{History Interaction-pg}{113} @xrdef{History Interaction-snt}{Section@tie 9.3} @xrdef{Event Designators-title}{Event Designators} -@xrdef{Event Designators-pg}{111} +@xrdef{Event Designators-pg}{113} @xrdef{Event Designators-snt}{Section@tie 9.3.1} @xrdef{Word Designators-title}{Word Designators} -@xrdef{Word Designators-pg}{112} +@xrdef{Word Designators-pg}{114} @xrdef{Word Designators-snt}{Section@tie 9.3.2} @xrdef{Modifiers-title}{Modifiers} -@xrdef{Modifiers-pg}{113} +@xrdef{Modifiers-pg}{115} @xrdef{Modifiers-snt}{Section@tie 9.3.3} @xrdef{Installing Bash-title}{Installing Bash} -@xrdef{Installing Bash-pg}{115} +@xrdef{Installing Bash-pg}{117} @xrdef{Installing Bash-snt}{Chapter@tie 10} @xrdef{Basic Installation-title}{Basic Installation} -@xrdef{Basic Installation-pg}{115} +@xrdef{Basic Installation-pg}{117} @xrdef{Basic Installation-snt}{Section@tie 10.1} @xrdef{Compilers and Options-title}{Compilers and Options} -@xrdef{Compilers and Options-pg}{116} +@xrdef{Compilers and Options-pg}{118} @xrdef{Compilers and Options-snt}{Section@tie 10.2} @xrdef{Compiling For Multiple Architectures-title}{Compiling For Multiple Architectures} -@xrdef{Compiling For Multiple Architectures-pg}{116} +@xrdef{Compiling For Multiple Architectures-pg}{118} @xrdef{Compiling For Multiple Architectures-snt}{Section@tie 10.3} @xrdef{Installation Names-title}{Installation Names} -@xrdef{Installation Names-pg}{116} +@xrdef{Installation Names-pg}{118} @xrdef{Installation Names-snt}{Section@tie 10.4} @xrdef{Specifying the System Type-title}{Specifying the System Type} -@xrdef{Specifying the System Type-pg}{117} +@xrdef{Specifying the System Type-pg}{119} @xrdef{Specifying the System Type-snt}{Section@tie 10.5} @xrdef{Sharing Defaults-title}{Sharing Defaults} -@xrdef{Sharing Defaults-pg}{117} +@xrdef{Sharing Defaults-pg}{119} @xrdef{Sharing Defaults-snt}{Section@tie 10.6} @xrdef{Operation Controls-title}{Operation Controls} -@xrdef{Operation Controls-pg}{117} +@xrdef{Operation Controls-pg}{119} @xrdef{Operation Controls-snt}{Section@tie 10.7} @xrdef{Optional Features-title}{Optional Features} -@xrdef{Optional Features-pg}{117} +@xrdef{Optional Features-pg}{119} @xrdef{Optional Features-snt}{Section@tie 10.8} @xrdef{Reporting Bugs-title}{Reporting Bugs} -@xrdef{Reporting Bugs-pg}{123} +@xrdef{Reporting Bugs-pg}{125} @xrdef{Reporting Bugs-snt}{Appendix@tie @char65{}} @xrdef{Major Differences From The Bourne Shell-title}{Major Differences From The Bourne Shell} -@xrdef{Major Differences From The Bourne Shell-pg}{125} +@xrdef{Major Differences From The Bourne Shell-pg}{127} @xrdef{Major Differences From The Bourne Shell-snt}{Appendix@tie @char66{}} @xrdef{Copying This Manual-title}{Copying This Manual} -@xrdef{Copying This Manual-pg}{131} +@xrdef{Copying This Manual-pg}{133} @xrdef{Copying This Manual-snt}{Appendix@tie @char67{}} @xrdef{GNU Free Documentation License-title}{GNU Free Documentation License} -@xrdef{GNU Free Documentation License-pg}{131} +@xrdef{GNU Free Documentation License-pg}{133} @xrdef{GNU Free Documentation License-snt}{Section@tie @char67.1} @xrdef{Builtin Index-title}{Index of Shell Builtin Commands} -@xrdef{Builtin Index-pg}{139} +@xrdef{Builtin Index-pg}{141} @xrdef{Builtin Index-snt}{} @xrdef{Reserved Word Index-title}{Index of Shell Reserved Words} -@xrdef{Reserved Word Index-pg}{141} +@xrdef{Reserved Word Index-pg}{143} @xrdef{Reserved Word Index-snt}{} @xrdef{Variable Index-title}{Parameter and Variable Index} -@xrdef{Variable Index-pg}{143} +@xrdef{Variable Index-pg}{145} @xrdef{Variable Index-snt}{} @xrdef{Function Index-title}{Function Index} -@xrdef{Function Index-pg}{145} +@xrdef{Function Index-pg}{147} @xrdef{Function Index-snt}{} @xrdef{Concept Index-title}{Concept Index} -@xrdef{Concept Index-pg}{147} +@xrdef{Concept Index-pg}{149} @xrdef{Concept Index-snt}{} diff --git a/doc/bashref.bt b/doc/bashref.bt index ddaba555e..4fb768a30 100644 --- a/doc/bashref.bt +++ b/doc/bashref.bt @@ -43,14 +43,14 @@ \entry{dirs}{73}{\code {dirs}} \entry{popd}{74}{\code {popd}} \entry{pushd}{74}{\code {pushd}} -\entry{bg}{80}{\code {bg}} -\entry{fg}{80}{\code {fg}} -\entry{jobs}{80}{\code {jobs}} -\entry{kill}{81}{\code {kill}} -\entry{wait}{81}{\code {wait}} -\entry{disown}{81}{\code {disown}} -\entry{suspend}{81}{\code {suspend}} -\entry{compgen}{105}{\code {compgen}} -\entry{complete}{105}{\code {complete}} -\entry{fc}{109}{\code {fc}} -\entry{history}{110}{\code {history}} +\entry{bg}{82}{\code {bg}} +\entry{fg}{82}{\code {fg}} +\entry{jobs}{82}{\code {jobs}} +\entry{kill}{83}{\code {kill}} +\entry{wait}{83}{\code {wait}} +\entry{disown}{83}{\code {disown}} +\entry{suspend}{83}{\code {suspend}} +\entry{compgen}{107}{\code {compgen}} +\entry{complete}{107}{\code {complete}} +\entry{fc}{111}{\code {fc}} +\entry{history}{112}{\code {history}} diff --git a/doc/bashref.bts b/doc/bashref.bts index 756c131f8..16a53f67e 100644 --- a/doc/bashref.bts +++ b/doc/bashref.bts @@ -7,7 +7,7 @@ \initial {A} \entry {\code {alias}}{39} \initial {B} -\entry {\code {bg}}{80} +\entry {\code {bg}}{82} \entry {\code {bind}}{39} \entry {\code {break}}{33} \entry {\code {builtin}}{40} @@ -15,13 +15,13 @@ \entry {\code {caller}}{40} \entry {\code {cd}}{33} \entry {\code {command}}{41} -\entry {\code {compgen}}{105} -\entry {\code {complete}}{105} +\entry {\code {compgen}}{107} +\entry {\code {complete}}{107} \entry {\code {continue}}{34} \initial {D} \entry {\code {declare}}{41} \entry {\code {dirs}}{73} -\entry {\code {disown}}{81} +\entry {\code {disown}}{83} \initial {E} \entry {\code {echo}}{42} \entry {\code {enable}}{42} @@ -30,18 +30,18 @@ \entry {\code {exit}}{34} \entry {\code {export}}{34} \initial {F} -\entry {\code {fc}}{109} -\entry {\code {fg}}{80} +\entry {\code {fc}}{111} +\entry {\code {fg}}{82} \initial {G} \entry {\code {getopts}}{35} \initial {H} \entry {\code {hash}}{35} \entry {\code {help}}{43} -\entry {\code {history}}{110} +\entry {\code {history}}{112} \initial {J} -\entry {\code {jobs}}{80} +\entry {\code {jobs}}{82} \initial {K} -\entry {\code {kill}}{81} +\entry {\code {kill}}{83} \initial {L} \entry {\code {let}}{43} \entry {\code {local}}{43} @@ -60,7 +60,7 @@ \entry {\code {shift}}{36} \entry {\code {shopt}}{45} \entry {\code {source}}{48} -\entry {\code {suspend}}{81} +\entry {\code {suspend}}{83} \initial {T} \entry {\code {test}}{37} \entry {\code {times}}{38} @@ -73,4 +73,4 @@ \entry {\code {unalias}}{50} \entry {\code {unset}}{39} \initial {W} -\entry {\code {wait}}{81} +\entry {\code {wait}}{83} diff --git a/doc/bashref.cp b/doc/bashref.cp index 1d42b6ca4..99e410c85 100644 --- a/doc/bashref.cp +++ b/doc/bashref.cp @@ -88,31 +88,31 @@ \entry{prompting}{75}{prompting} \entry{restricted shell}{76}{restricted shell} \entry{POSIX Mode}{76}{POSIX Mode} -\entry{job control}{79}{job control} -\entry{foreground}{79}{foreground} -\entry{background}{79}{background} -\entry{suspending jobs}{79}{suspending jobs} -\entry{Readline, how to use}{82}{Readline, how to use} -\entry{interaction, readline}{83}{interaction, readline} -\entry{notation, readline}{83}{notation, readline} -\entry{command editing}{83}{command editing} -\entry{editing command lines}{83}{editing command lines} -\entry{killing text}{85}{killing text} -\entry{yanking text}{85}{yanking text} -\entry{kill ring}{85}{kill ring} -\entry{initialization file, readline}{86}{initialization file, readline} -\entry{variables, readline}{87}{variables, readline} -\entry{programmable completion}{103}{programmable completion} -\entry{completion builtins}{105}{completion builtins} -\entry{History, how to use}{108}{History, how to use} -\entry{command history}{109}{command history} -\entry{history list}{109}{history list} -\entry{history builtins}{109}{history builtins} -\entry{history expansion}{111}{history expansion} -\entry{event designators}{111}{event designators} -\entry{history events}{111}{history events} -\entry{installation}{115}{installation} -\entry{configuration}{115}{configuration} -\entry{Bash installation}{115}{Bash installation} -\entry{Bash configuration}{115}{Bash configuration} -\entry{FDL, GNU Free Documentation License}{131}{FDL, GNU Free Documentation License} +\entry{job control}{81}{job control} +\entry{foreground}{81}{foreground} +\entry{background}{81}{background} +\entry{suspending jobs}{81}{suspending jobs} +\entry{Readline, how to use}{84}{Readline, how to use} +\entry{interaction, readline}{85}{interaction, readline} +\entry{notation, readline}{85}{notation, readline} +\entry{command editing}{85}{command editing} +\entry{editing command lines}{85}{editing command lines} +\entry{killing text}{87}{killing text} +\entry{yanking text}{87}{yanking text} +\entry{kill ring}{87}{kill ring} +\entry{initialization file, readline}{88}{initialization file, readline} +\entry{variables, readline}{89}{variables, readline} +\entry{programmable completion}{105}{programmable completion} +\entry{completion builtins}{107}{completion builtins} +\entry{History, how to use}{110}{History, how to use} +\entry{command history}{111}{command history} +\entry{history list}{111}{history list} +\entry{history builtins}{111}{history builtins} +\entry{history expansion}{113}{history expansion} +\entry{event designators}{113}{event designators} +\entry{history events}{113}{history events} +\entry{installation}{117}{installation} +\entry{configuration}{117}{configuration} +\entry{Bash installation}{117}{Bash installation} +\entry{Bash configuration}{117}{Bash configuration} +\entry{FDL, GNU Free Documentation License}{133}{FDL, GNU Free Documentation License} diff --git a/doc/bashref.cps b/doc/bashref.cps index 158016434..2cd5de326 100644 --- a/doc/bashref.cps +++ b/doc/bashref.cps @@ -5,17 +5,17 @@ \entry {arithmetic, shell}{70} \entry {arrays}{72} \initial {B} -\entry {background}{79} -\entry {Bash configuration}{115} -\entry {Bash installation}{115} +\entry {background}{81} +\entry {Bash configuration}{117} +\entry {Bash installation}{117} \entry {Bourne shell}{5} \entry {brace expansion}{17} \entry {builtin}{3} \initial {C} -\entry {command editing}{83} +\entry {command editing}{85} \entry {command execution}{28} \entry {command expansion}{28} -\entry {command history}{109} +\entry {command history}{111} \entry {command search}{28} \entry {command substitution}{21} \entry {command timing}{8} @@ -28,16 +28,16 @@ \entry {commands, shell}{8} \entry {commands, simple}{8} \entry {comments, shell}{7} -\entry {completion builtins}{105} -\entry {configuration}{115} +\entry {completion builtins}{107} +\entry {configuration}{117} \entry {control operator}{3} \initial {D} \entry {directory stack}{73} \initial {E} -\entry {editing command lines}{83} +\entry {editing command lines}{85} \entry {environment}{30} \entry {evaluation, arithmetic}{70} -\entry {event designators}{111} +\entry {event designators}{113} \entry {execution environment}{29} \entry {exit status}{3, 30} \entry {expansion}{16} @@ -50,31 +50,31 @@ \entry {expressions, arithmetic}{70} \entry {expressions, conditional}{69} \initial {F} -\entry {FDL, GNU Free Documentation License}{131} +\entry {FDL, GNU Free Documentation License}{133} \entry {field}{3} \entry {filename}{3} \entry {filename expansion}{22} -\entry {foreground}{79} +\entry {foreground}{81} \entry {functions, shell}{13} \initial {H} -\entry {history builtins}{109} -\entry {history events}{111} -\entry {history expansion}{111} -\entry {history list}{109} -\entry {History, how to use}{108} +\entry {history builtins}{111} +\entry {history events}{113} +\entry {history expansion}{113} +\entry {history list}{111} +\entry {History, how to use}{110} \initial {I} \entry {identifier}{3} -\entry {initialization file, readline}{86} -\entry {installation}{115} -\entry {interaction, readline}{83} +\entry {initialization file, readline}{88} +\entry {installation}{117} +\entry {interaction, readline}{85} \entry {interactive shell}{65, 67} \entry {internationalization}{7} \initial {J} \entry {job}{3} -\entry {job control}{3, 79} +\entry {job control}{3, 81} \initial {K} -\entry {kill ring}{85} -\entry {killing text}{85} +\entry {kill ring}{87} +\entry {killing text}{87} \initial {L} \entry {localization}{7} \entry {login shell}{65} @@ -84,7 +84,7 @@ \initial {N} \entry {name}{3} \entry {native languages}{7} -\entry {notation, readline}{83} +\entry {notation, readline}{85} \initial {O} \entry {operator, shell}{3} \initial {P} @@ -100,13 +100,13 @@ \entry {process group}{3} \entry {process group ID}{3} \entry {process substitution}{22} -\entry {programmable completion}{103} +\entry {programmable completion}{105} \entry {prompting}{75} \initial {Q} \entry {quoting}{6} \entry {quoting, ANSI}{6} \initial {R} -\entry {Readline, how to use}{82} +\entry {Readline, how to use}{84} \entry {redirection}{24} \entry {reserved word}{3} \entry {restricted shell}{76} @@ -121,16 +121,16 @@ \entry {signal handling}{31} \entry {special builtin}{4, 53} \entry {startup files}{65} -\entry {suspending jobs}{79} +\entry {suspending jobs}{81} \initial {T} \entry {tilde expansion}{18} \entry {token}{4} \entry {translation, native languages}{7} \initial {V} \entry {variable, shell}{15} -\entry {variables, readline}{87} +\entry {variables, readline}{89} \initial {W} \entry {word}{4} \entry {word splitting}{22} \initial {Y} -\entry {yanking text}{85} +\entry {yanking text}{87} diff --git a/doc/bashref.dvi b/doc/bashref.dvi index f88948973..03fd45dac 100644 Binary files a/doc/bashref.dvi and b/doc/bashref.dvi differ diff --git a/doc/bashref.fn b/doc/bashref.fn index 64d15e488..8310d6cb5 100644 --- a/doc/bashref.fn +++ b/doc/bashref.fn @@ -1,96 +1,96 @@ -\entry{beginning-of-line (C-a)}{95}{\code {beginning-of-line (C-a)}} -\entry{end-of-line (C-e)}{95}{\code {end-of-line (C-e)}} -\entry{forward-char (C-f)}{95}{\code {forward-char (C-f)}} -\entry{backward-char (C-b)}{95}{\code {backward-char (C-b)}} -\entry{forward-word (M-f)}{95}{\code {forward-word (M-f)}} -\entry{backward-word (M-b)}{95}{\code {backward-word (M-b)}} -\entry{clear-screen (C-l)}{95}{\code {clear-screen (C-l)}} -\entry{redraw-current-line ()}{95}{\code {redraw-current-line ()}} -\entry{accept-line (Newline or Return)}{95}{\code {accept-line (Newline or Return)}} -\entry{previous-history (C-p)}{96}{\code {previous-history (C-p)}} -\entry{next-history (C-n)}{96}{\code {next-history (C-n)}} -\entry{beginning-of-history (M-<)}{96}{\code {beginning-of-history (M-<)}} -\entry{end-of-history (M->)}{96}{\code {end-of-history (M->)}} -\entry{reverse-search-history (C-r)}{96}{\code {reverse-search-history (C-r)}} -\entry{forward-search-history (C-s)}{96}{\code {forward-search-history (C-s)}} -\entry{non-incremental-reverse-search-history (M-p)}{96}{\code {non-incremental-reverse-search-history (M-p)}} -\entry{non-incremental-forward-search-history (M-n)}{96}{\code {non-incremental-forward-search-history (M-n)}} -\entry{history-search-forward ()}{96}{\code {history-search-forward ()}} -\entry{history-search-backward ()}{96}{\code {history-search-backward ()}} -\entry{yank-nth-arg (M-C-y)}{96}{\code {yank-nth-arg (M-C-y)}} -\entry{yank-last-arg (M-. or M-_)}{96}{\code {yank-last-arg (M-. or M-_)}} -\entry{delete-char (C-d)}{97}{\code {delete-char (C-d)}} -\entry{backward-delete-char (Rubout)}{97}{\code {backward-delete-char (Rubout)}} -\entry{forward-backward-delete-char ()}{97}{\code {forward-backward-delete-char ()}} -\entry{quoted-insert (C-q or C-v)}{97}{\code {quoted-insert (C-q or C-v)}} -\entry{self-insert (a, b, A, 1, !, ...{})}{97}{\code {self-insert (a, b, A, 1, !, \dots {})}} -\entry{transpose-chars (C-t)}{97}{\code {transpose-chars (C-t)}} -\entry{transpose-words (M-t)}{97}{\code {transpose-words (M-t)}} -\entry{upcase-word (M-u)}{97}{\code {upcase-word (M-u)}} -\entry{downcase-word (M-l)}{97}{\code {downcase-word (M-l)}} -\entry{capitalize-word (M-c)}{97}{\code {capitalize-word (M-c)}} -\entry{overwrite-mode ()}{97}{\code {overwrite-mode ()}} -\entry{kill-line (C-k)}{98}{\code {kill-line (C-k)}} -\entry{backward-kill-line (C-x Rubout)}{98}{\code {backward-kill-line (C-x Rubout)}} -\entry{unix-line-discard (C-u)}{98}{\code {unix-line-discard (C-u)}} -\entry{kill-whole-line ()}{98}{\code {kill-whole-line ()}} -\entry{kill-word (M-d)}{98}{\code {kill-word (M-d)}} -\entry{backward-kill-word (M-DEL)}{98}{\code {backward-kill-word (M-\key {DEL})}} -\entry{unix-word-rubout (C-w)}{98}{\code {unix-word-rubout (C-w)}} -\entry{unix-filename-rubout ()}{98}{\code {unix-filename-rubout ()}} -\entry{delete-horizontal-space ()}{98}{\code {delete-horizontal-space ()}} -\entry{kill-region ()}{98}{\code {kill-region ()}} -\entry{copy-region-as-kill ()}{98}{\code {copy-region-as-kill ()}} -\entry{copy-backward-word ()}{98}{\code {copy-backward-word ()}} -\entry{copy-forward-word ()}{98}{\code {copy-forward-word ()}} -\entry{yank (C-y)}{99}{\code {yank (C-y)}} -\entry{yank-pop (M-y)}{99}{\code {yank-pop (M-y)}} -\entry{digit-argument (M-0, M-1, ...{} M--)}{99}{\code {digit-argument (\kbd {M-0}, \kbd {M-1}, \dots {} \kbd {M--})}} -\entry{universal-argument ()}{99}{\code {universal-argument ()}} -\entry{complete (TAB)}{99}{\code {complete (\key {TAB})}} -\entry{possible-completions (M-?)}{99}{\code {possible-completions (M-?)}} -\entry{insert-completions (M-*)}{99}{\code {insert-completions (M-*)}} -\entry{menu-complete ()}{99}{\code {menu-complete ()}} -\entry{delete-char-or-list ()}{100}{\code {delete-char-or-list ()}} -\entry{complete-filename (M-/)}{100}{\code {complete-filename (M-/)}} -\entry{possible-filename-completions (C-x /)}{100}{\code {possible-filename-completions (C-x /)}} -\entry{complete-username (M-~)}{100}{\code {complete-username (M-~)}} -\entry{possible-username-completions (C-x ~)}{100}{\code {possible-username-completions (C-x ~)}} -\entry{complete-variable (M-$)}{100}{\code {complete-variable (M-$)}} -\entry{possible-variable-completions (C-x $)}{100}{\code {possible-variable-completions (C-x $)}} -\entry{complete-hostname (M-@)}{100}{\code {complete-hostname (M-@)}} -\entry{possible-hostname-completions (C-x @)}{100}{\code {possible-hostname-completions (C-x @)}} -\entry{complete-command (M-!)}{100}{\code {complete-command (M-!)}} -\entry{possible-command-completions (C-x !)}{100}{\code {possible-command-completions (C-x !)}} -\entry{dynamic-complete-history (M-TAB)}{100}{\code {dynamic-complete-history (M-\key {TAB})}} -\entry{complete-into-braces (M-{\tt \char 123})}{100}{\code {complete-into-braces (M-{\tt \char 123})}} -\entry{start-kbd-macro (C-x ()}{100}{\code {start-kbd-macro (C-x ()}} -\entry{end-kbd-macro (C-x ))}{101}{\code {end-kbd-macro (C-x ))}} -\entry{call-last-kbd-macro (C-x e)}{101}{\code {call-last-kbd-macro (C-x e)}} -\entry{re-read-init-file (C-x C-r)}{101}{\code {re-read-init-file (C-x C-r)}} -\entry{abort (C-g)}{101}{\code {abort (C-g)}} -\entry{do-uppercase-version (M-a, M-b, M-x, ...{})}{101}{\code {do-uppercase-version (M-a, M-b, M-\var {x}, \dots {})}} -\entry{prefix-meta (ESC)}{101}{\code {prefix-meta (\key {ESC})}} -\entry{undo (C-_ or C-x C-u)}{101}{\code {undo (C-_ or C-x C-u)}} -\entry{revert-line (M-r)}{101}{\code {revert-line (M-r)}} -\entry{tilde-expand (M-&)}{101}{\code {tilde-expand (M-&)}} -\entry{set-mark (C-@)}{101}{\code {set-mark (C-@)}} -\entry{exchange-point-and-mark (C-x C-x)}{101}{\code {exchange-point-and-mark (C-x C-x)}} -\entry{character-search (C-])}{101}{\code {character-search (C-])}} -\entry{character-search-backward (M-C-])}{101}{\code {character-search-backward (M-C-])}} -\entry{insert-comment (M-#)}{102}{\code {insert-comment (M-#)}} -\entry{dump-functions ()}{102}{\code {dump-functions ()}} -\entry{dump-variables ()}{102}{\code {dump-variables ()}} -\entry{dump-macros ()}{102}{\code {dump-macros ()}} -\entry{glob-complete-word (M-g)}{102}{\code {glob-complete-word (M-g)}} -\entry{glob-expand-word (C-x *)}{102}{\code {glob-expand-word (C-x *)}} -\entry{glob-list-expansions (C-x g)}{102}{\code {glob-list-expansions (C-x g)}} -\entry{display-shell-version (C-x C-v)}{102}{\code {display-shell-version (C-x C-v)}} -\entry{shell-expand-line (M-C-e)}{102}{\code {shell-expand-line (M-C-e)}} -\entry{history-expand-line (M-^)}{102}{\code {history-expand-line (M-^)}} -\entry{magic-space ()}{103}{\code {magic-space ()}} -\entry{alias-expand-line ()}{103}{\code {alias-expand-line ()}} -\entry{history-and-alias-expand-line ()}{103}{\code {history-and-alias-expand-line ()}} -\entry{insert-last-argument (M-. or M-_)}{103}{\code {insert-last-argument (M-. or M-_)}} -\entry{operate-and-get-next (C-o)}{103}{\code {operate-and-get-next (C-o)}} -\entry{edit-and-execute-command (C-xC-e)}{103}{\code {edit-and-execute-command (C-xC-e)}} +\entry{beginning-of-line (C-a)}{97}{\code {beginning-of-line (C-a)}} +\entry{end-of-line (C-e)}{97}{\code {end-of-line (C-e)}} +\entry{forward-char (C-f)}{97}{\code {forward-char (C-f)}} +\entry{backward-char (C-b)}{97}{\code {backward-char (C-b)}} +\entry{forward-word (M-f)}{97}{\code {forward-word (M-f)}} +\entry{backward-word (M-b)}{97}{\code {backward-word (M-b)}} +\entry{clear-screen (C-l)}{97}{\code {clear-screen (C-l)}} +\entry{redraw-current-line ()}{97}{\code {redraw-current-line ()}} +\entry{accept-line (Newline or Return)}{97}{\code {accept-line (Newline or Return)}} +\entry{previous-history (C-p)}{98}{\code {previous-history (C-p)}} +\entry{next-history (C-n)}{98}{\code {next-history (C-n)}} +\entry{beginning-of-history (M-<)}{98}{\code {beginning-of-history (M-<)}} +\entry{end-of-history (M->)}{98}{\code {end-of-history (M->)}} +\entry{reverse-search-history (C-r)}{98}{\code {reverse-search-history (C-r)}} +\entry{forward-search-history (C-s)}{98}{\code {forward-search-history (C-s)}} +\entry{non-incremental-reverse-search-history (M-p)}{98}{\code {non-incremental-reverse-search-history (M-p)}} +\entry{non-incremental-forward-search-history (M-n)}{98}{\code {non-incremental-forward-search-history (M-n)}} +\entry{history-search-forward ()}{98}{\code {history-search-forward ()}} +\entry{history-search-backward ()}{98}{\code {history-search-backward ()}} +\entry{yank-nth-arg (M-C-y)}{98}{\code {yank-nth-arg (M-C-y)}} +\entry{yank-last-arg (M-. or M-_)}{98}{\code {yank-last-arg (M-. or M-_)}} +\entry{delete-char (C-d)}{99}{\code {delete-char (C-d)}} +\entry{backward-delete-char (Rubout)}{99}{\code {backward-delete-char (Rubout)}} +\entry{forward-backward-delete-char ()}{99}{\code {forward-backward-delete-char ()}} +\entry{quoted-insert (C-q or C-v)}{99}{\code {quoted-insert (C-q or C-v)}} +\entry{self-insert (a, b, A, 1, !, ...{})}{99}{\code {self-insert (a, b, A, 1, !, \dots {})}} +\entry{transpose-chars (C-t)}{99}{\code {transpose-chars (C-t)}} +\entry{transpose-words (M-t)}{99}{\code {transpose-words (M-t)}} +\entry{upcase-word (M-u)}{99}{\code {upcase-word (M-u)}} +\entry{downcase-word (M-l)}{99}{\code {downcase-word (M-l)}} +\entry{capitalize-word (M-c)}{99}{\code {capitalize-word (M-c)}} +\entry{overwrite-mode ()}{99}{\code {overwrite-mode ()}} +\entry{kill-line (C-k)}{100}{\code {kill-line (C-k)}} +\entry{backward-kill-line (C-x Rubout)}{100}{\code {backward-kill-line (C-x Rubout)}} +\entry{unix-line-discard (C-u)}{100}{\code {unix-line-discard (C-u)}} +\entry{kill-whole-line ()}{100}{\code {kill-whole-line ()}} +\entry{kill-word (M-d)}{100}{\code {kill-word (M-d)}} +\entry{backward-kill-word (M-DEL)}{100}{\code {backward-kill-word (M-\key {DEL})}} +\entry{unix-word-rubout (C-w)}{100}{\code {unix-word-rubout (C-w)}} +\entry{unix-filename-rubout ()}{100}{\code {unix-filename-rubout ()}} +\entry{delete-horizontal-space ()}{100}{\code {delete-horizontal-space ()}} +\entry{kill-region ()}{100}{\code {kill-region ()}} +\entry{copy-region-as-kill ()}{100}{\code {copy-region-as-kill ()}} +\entry{copy-backward-word ()}{100}{\code {copy-backward-word ()}} +\entry{copy-forward-word ()}{100}{\code {copy-forward-word ()}} +\entry{yank (C-y)}{101}{\code {yank (C-y)}} +\entry{yank-pop (M-y)}{101}{\code {yank-pop (M-y)}} +\entry{digit-argument (M-0, M-1, ...{} M--)}{101}{\code {digit-argument (\kbd {M-0}, \kbd {M-1}, \dots {} \kbd {M--})}} +\entry{universal-argument ()}{101}{\code {universal-argument ()}} +\entry{complete (TAB)}{101}{\code {complete (\key {TAB})}} +\entry{possible-completions (M-?)}{101}{\code {possible-completions (M-?)}} +\entry{insert-completions (M-*)}{101}{\code {insert-completions (M-*)}} +\entry{menu-complete ()}{101}{\code {menu-complete ()}} +\entry{delete-char-or-list ()}{102}{\code {delete-char-or-list ()}} +\entry{complete-filename (M-/)}{102}{\code {complete-filename (M-/)}} +\entry{possible-filename-completions (C-x /)}{102}{\code {possible-filename-completions (C-x /)}} +\entry{complete-username (M-~)}{102}{\code {complete-username (M-~)}} +\entry{possible-username-completions (C-x ~)}{102}{\code {possible-username-completions (C-x ~)}} +\entry{complete-variable (M-$)}{102}{\code {complete-variable (M-$)}} +\entry{possible-variable-completions (C-x $)}{102}{\code {possible-variable-completions (C-x $)}} +\entry{complete-hostname (M-@)}{102}{\code {complete-hostname (M-@)}} +\entry{possible-hostname-completions (C-x @)}{102}{\code {possible-hostname-completions (C-x @)}} +\entry{complete-command (M-!)}{102}{\code {complete-command (M-!)}} +\entry{possible-command-completions (C-x !)}{102}{\code {possible-command-completions (C-x !)}} +\entry{dynamic-complete-history (M-TAB)}{102}{\code {dynamic-complete-history (M-\key {TAB})}} +\entry{complete-into-braces (M-{\tt \char 123})}{102}{\code {complete-into-braces (M-{\tt \char 123})}} +\entry{start-kbd-macro (C-x ()}{102}{\code {start-kbd-macro (C-x ()}} +\entry{end-kbd-macro (C-x ))}{103}{\code {end-kbd-macro (C-x ))}} +\entry{call-last-kbd-macro (C-x e)}{103}{\code {call-last-kbd-macro (C-x e)}} +\entry{re-read-init-file (C-x C-r)}{103}{\code {re-read-init-file (C-x C-r)}} +\entry{abort (C-g)}{103}{\code {abort (C-g)}} +\entry{do-uppercase-version (M-a, M-b, M-x, ...{})}{103}{\code {do-uppercase-version (M-a, M-b, M-\var {x}, \dots {})}} +\entry{prefix-meta (ESC)}{103}{\code {prefix-meta (\key {ESC})}} +\entry{undo (C-_ or C-x C-u)}{103}{\code {undo (C-_ or C-x C-u)}} +\entry{revert-line (M-r)}{103}{\code {revert-line (M-r)}} +\entry{tilde-expand (M-&)}{103}{\code {tilde-expand (M-&)}} +\entry{set-mark (C-@)}{103}{\code {set-mark (C-@)}} +\entry{exchange-point-and-mark (C-x C-x)}{103}{\code {exchange-point-and-mark (C-x C-x)}} +\entry{character-search (C-])}{103}{\code {character-search (C-])}} +\entry{character-search-backward (M-C-])}{103}{\code {character-search-backward (M-C-])}} +\entry{insert-comment (M-#)}{104}{\code {insert-comment (M-#)}} +\entry{dump-functions ()}{104}{\code {dump-functions ()}} +\entry{dump-variables ()}{104}{\code {dump-variables ()}} +\entry{dump-macros ()}{104}{\code {dump-macros ()}} +\entry{glob-complete-word (M-g)}{104}{\code {glob-complete-word (M-g)}} +\entry{glob-expand-word (C-x *)}{104}{\code {glob-expand-word (C-x *)}} +\entry{glob-list-expansions (C-x g)}{104}{\code {glob-list-expansions (C-x g)}} +\entry{display-shell-version (C-x C-v)}{104}{\code {display-shell-version (C-x C-v)}} +\entry{shell-expand-line (M-C-e)}{104}{\code {shell-expand-line (M-C-e)}} +\entry{history-expand-line (M-^)}{104}{\code {history-expand-line (M-^)}} +\entry{magic-space ()}{105}{\code {magic-space ()}} +\entry{alias-expand-line ()}{105}{\code {alias-expand-line ()}} +\entry{history-and-alias-expand-line ()}{105}{\code {history-and-alias-expand-line ()}} +\entry{insert-last-argument (M-. or M-_)}{105}{\code {insert-last-argument (M-. or M-_)}} +\entry{operate-and-get-next (C-o)}{105}{\code {operate-and-get-next (C-o)}} +\entry{edit-and-execute-command (C-xC-e)}{105}{\code {edit-and-execute-command (C-xC-e)}} diff --git a/doc/bashref.fns b/doc/bashref.fns index 105b9a94b..aa7cd7684 100644 --- a/doc/bashref.fns +++ b/doc/bashref.fns @@ -1,116 +1,116 @@ \initial {A} -\entry {\code {abort (C-g)}}{101} -\entry {\code {accept-line (Newline or Return)}}{95} -\entry {\code {alias-expand-line ()}}{103} +\entry {\code {abort (C-g)}}{103} +\entry {\code {accept-line (Newline or Return)}}{97} +\entry {\code {alias-expand-line ()}}{105} \initial {B} -\entry {\code {backward-char (C-b)}}{95} -\entry {\code {backward-delete-char (Rubout)}}{97} -\entry {\code {backward-kill-line (C-x Rubout)}}{98} -\entry {\code {backward-kill-word (M-\key {DEL})}}{98} -\entry {\code {backward-word (M-b)}}{95} -\entry {\code {beginning-of-history (M-<)}}{96} -\entry {\code {beginning-of-line (C-a)}}{95} +\entry {\code {backward-char (C-b)}}{97} +\entry {\code {backward-delete-char (Rubout)}}{99} +\entry {\code {backward-kill-line (C-x Rubout)}}{100} +\entry {\code {backward-kill-word (M-\key {DEL})}}{100} +\entry {\code {backward-word (M-b)}}{97} +\entry {\code {beginning-of-history (M-<)}}{98} +\entry {\code {beginning-of-line (C-a)}}{97} \initial {C} -\entry {\code {call-last-kbd-macro (C-x e)}}{101} -\entry {\code {capitalize-word (M-c)}}{97} -\entry {\code {character-search (C-])}}{101} -\entry {\code {character-search-backward (M-C-])}}{101} -\entry {\code {clear-screen (C-l)}}{95} -\entry {\code {complete (\key {TAB})}}{99} -\entry {\code {complete-command (M-!)}}{100} -\entry {\code {complete-filename (M-/)}}{100} -\entry {\code {complete-hostname (M-@)}}{100} -\entry {\code {complete-into-braces (M-{\tt \char 123})}}{100} -\entry {\code {complete-username (M-~)}}{100} -\entry {\code {complete-variable (M-$)}}{100} -\entry {\code {copy-backward-word ()}}{98} -\entry {\code {copy-forward-word ()}}{98} -\entry {\code {copy-region-as-kill ()}}{98} +\entry {\code {call-last-kbd-macro (C-x e)}}{103} +\entry {\code {capitalize-word (M-c)}}{99} +\entry {\code {character-search (C-])}}{103} +\entry {\code {character-search-backward (M-C-])}}{103} +\entry {\code {clear-screen (C-l)}}{97} +\entry {\code {complete (\key {TAB})}}{101} +\entry {\code {complete-command (M-!)}}{102} +\entry {\code {complete-filename (M-/)}}{102} +\entry {\code {complete-hostname (M-@)}}{102} +\entry {\code {complete-into-braces (M-{\tt \char 123})}}{102} +\entry {\code {complete-username (M-~)}}{102} +\entry {\code {complete-variable (M-$)}}{102} +\entry {\code {copy-backward-word ()}}{100} +\entry {\code {copy-forward-word ()}}{100} +\entry {\code {copy-region-as-kill ()}}{100} \initial {D} -\entry {\code {delete-char (C-d)}}{97} -\entry {\code {delete-char-or-list ()}}{100} -\entry {\code {delete-horizontal-space ()}}{98} -\entry {\code {digit-argument (\kbd {M-0}, \kbd {M-1}, \dots {} \kbd {M--})}}{99} -\entry {\code {display-shell-version (C-x C-v)}}{102} -\entry {\code {do-uppercase-version (M-a, M-b, M-\var {x}, \dots {})}}{101} -\entry {\code {downcase-word (M-l)}}{97} -\entry {\code {dump-functions ()}}{102} -\entry {\code {dump-macros ()}}{102} -\entry {\code {dump-variables ()}}{102} -\entry {\code {dynamic-complete-history (M-\key {TAB})}}{100} +\entry {\code {delete-char (C-d)}}{99} +\entry {\code {delete-char-or-list ()}}{102} +\entry {\code {delete-horizontal-space ()}}{100} +\entry {\code {digit-argument (\kbd {M-0}, \kbd {M-1}, \dots {} \kbd {M--})}}{101} +\entry {\code {display-shell-version (C-x C-v)}}{104} +\entry {\code {do-uppercase-version (M-a, M-b, M-\var {x}, \dots {})}}{103} +\entry {\code {downcase-word (M-l)}}{99} +\entry {\code {dump-functions ()}}{104} +\entry {\code {dump-macros ()}}{104} +\entry {\code {dump-variables ()}}{104} +\entry {\code {dynamic-complete-history (M-\key {TAB})}}{102} \initial {E} -\entry {\code {edit-and-execute-command (C-xC-e)}}{103} -\entry {\code {end-kbd-macro (C-x ))}}{101} -\entry {\code {end-of-history (M->)}}{96} -\entry {\code {end-of-line (C-e)}}{95} -\entry {\code {exchange-point-and-mark (C-x C-x)}}{101} +\entry {\code {edit-and-execute-command (C-xC-e)}}{105} +\entry {\code {end-kbd-macro (C-x ))}}{103} +\entry {\code {end-of-history (M->)}}{98} +\entry {\code {end-of-line (C-e)}}{97} +\entry {\code {exchange-point-and-mark (C-x C-x)}}{103} \initial {F} -\entry {\code {forward-backward-delete-char ()}}{97} -\entry {\code {forward-char (C-f)}}{95} -\entry {\code {forward-search-history (C-s)}}{96} -\entry {\code {forward-word (M-f)}}{95} +\entry {\code {forward-backward-delete-char ()}}{99} +\entry {\code {forward-char (C-f)}}{97} +\entry {\code {forward-search-history (C-s)}}{98} +\entry {\code {forward-word (M-f)}}{97} \initial {G} -\entry {\code {glob-complete-word (M-g)}}{102} -\entry {\code {glob-expand-word (C-x *)}}{102} -\entry {\code {glob-list-expansions (C-x g)}}{102} +\entry {\code {glob-complete-word (M-g)}}{104} +\entry {\code {glob-expand-word (C-x *)}}{104} +\entry {\code {glob-list-expansions (C-x g)}}{104} \initial {H} -\entry {\code {history-and-alias-expand-line ()}}{103} -\entry {\code {history-expand-line (M-^)}}{102} -\entry {\code {history-search-backward ()}}{96} -\entry {\code {history-search-forward ()}}{96} +\entry {\code {history-and-alias-expand-line ()}}{105} +\entry {\code {history-expand-line (M-^)}}{104} +\entry {\code {history-search-backward ()}}{98} +\entry {\code {history-search-forward ()}}{98} \initial {I} -\entry {\code {insert-comment (M-#)}}{102} -\entry {\code {insert-completions (M-*)}}{99} -\entry {\code {insert-last-argument (M-. or M-_)}}{103} +\entry {\code {insert-comment (M-#)}}{104} +\entry {\code {insert-completions (M-*)}}{101} +\entry {\code {insert-last-argument (M-. or M-_)}}{105} \initial {K} -\entry {\code {kill-line (C-k)}}{98} -\entry {\code {kill-region ()}}{98} -\entry {\code {kill-whole-line ()}}{98} -\entry {\code {kill-word (M-d)}}{98} +\entry {\code {kill-line (C-k)}}{100} +\entry {\code {kill-region ()}}{100} +\entry {\code {kill-whole-line ()}}{100} +\entry {\code {kill-word (M-d)}}{100} \initial {M} -\entry {\code {magic-space ()}}{103} -\entry {\code {menu-complete ()}}{99} +\entry {\code {magic-space ()}}{105} +\entry {\code {menu-complete ()}}{101} \initial {N} -\entry {\code {next-history (C-n)}}{96} -\entry {\code {non-incremental-forward-search-history (M-n)}}{96} -\entry {\code {non-incremental-reverse-search-history (M-p)}}{96} +\entry {\code {next-history (C-n)}}{98} +\entry {\code {non-incremental-forward-search-history (M-n)}}{98} +\entry {\code {non-incremental-reverse-search-history (M-p)}}{98} \initial {O} -\entry {\code {operate-and-get-next (C-o)}}{103} -\entry {\code {overwrite-mode ()}}{97} +\entry {\code {operate-and-get-next (C-o)}}{105} +\entry {\code {overwrite-mode ()}}{99} \initial {P} -\entry {\code {possible-command-completions (C-x !)}}{100} -\entry {\code {possible-completions (M-?)}}{99} -\entry {\code {possible-filename-completions (C-x /)}}{100} -\entry {\code {possible-hostname-completions (C-x @)}}{100} -\entry {\code {possible-username-completions (C-x ~)}}{100} -\entry {\code {possible-variable-completions (C-x $)}}{100} -\entry {\code {prefix-meta (\key {ESC})}}{101} -\entry {\code {previous-history (C-p)}}{96} +\entry {\code {possible-command-completions (C-x !)}}{102} +\entry {\code {possible-completions (M-?)}}{101} +\entry {\code {possible-filename-completions (C-x /)}}{102} +\entry {\code {possible-hostname-completions (C-x @)}}{102} +\entry {\code {possible-username-completions (C-x ~)}}{102} +\entry {\code {possible-variable-completions (C-x $)}}{102} +\entry {\code {prefix-meta (\key {ESC})}}{103} +\entry {\code {previous-history (C-p)}}{98} \initial {Q} -\entry {\code {quoted-insert (C-q or C-v)}}{97} +\entry {\code {quoted-insert (C-q or C-v)}}{99} \initial {R} -\entry {\code {re-read-init-file (C-x C-r)}}{101} -\entry {\code {redraw-current-line ()}}{95} -\entry {\code {reverse-search-history (C-r)}}{96} -\entry {\code {revert-line (M-r)}}{101} +\entry {\code {re-read-init-file (C-x C-r)}}{103} +\entry {\code {redraw-current-line ()}}{97} +\entry {\code {reverse-search-history (C-r)}}{98} +\entry {\code {revert-line (M-r)}}{103} \initial {S} -\entry {\code {self-insert (a, b, A, 1, !, \dots {})}}{97} -\entry {\code {set-mark (C-@)}}{101} -\entry {\code {shell-expand-line (M-C-e)}}{102} -\entry {\code {start-kbd-macro (C-x ()}}{100} +\entry {\code {self-insert (a, b, A, 1, !, \dots {})}}{99} +\entry {\code {set-mark (C-@)}}{103} +\entry {\code {shell-expand-line (M-C-e)}}{104} +\entry {\code {start-kbd-macro (C-x ()}}{102} \initial {T} -\entry {\code {tilde-expand (M-&)}}{101} -\entry {\code {transpose-chars (C-t)}}{97} -\entry {\code {transpose-words (M-t)}}{97} +\entry {\code {tilde-expand (M-&)}}{103} +\entry {\code {transpose-chars (C-t)}}{99} +\entry {\code {transpose-words (M-t)}}{99} \initial {U} -\entry {\code {undo (C-_ or C-x C-u)}}{101} -\entry {\code {universal-argument ()}}{99} -\entry {\code {unix-filename-rubout ()}}{98} -\entry {\code {unix-line-discard (C-u)}}{98} -\entry {\code {unix-word-rubout (C-w)}}{98} -\entry {\code {upcase-word (M-u)}}{97} +\entry {\code {undo (C-_ or C-x C-u)}}{103} +\entry {\code {universal-argument ()}}{101} +\entry {\code {unix-filename-rubout ()}}{100} +\entry {\code {unix-line-discard (C-u)}}{100} +\entry {\code {unix-word-rubout (C-w)}}{100} +\entry {\code {upcase-word (M-u)}}{99} \initial {Y} -\entry {\code {yank (C-y)}}{99} -\entry {\code {yank-last-arg (M-. or M-_)}}{96} -\entry {\code {yank-nth-arg (M-C-y)}}{96} -\entry {\code {yank-pop (M-y)}}{99} +\entry {\code {yank (C-y)}}{101} +\entry {\code {yank-last-arg (M-. or M-_)}}{98} +\entry {\code {yank-nth-arg (M-C-y)}}{98} +\entry {\code {yank-pop (M-y)}}{101} diff --git a/doc/bashref.html b/doc/bashref.html index 0189bd46e..80405a984 100644 --- a/doc/bashref.html +++ b/doc/bashref.html @@ -1,6 +1,6 @@ - + ", cs, word); + strlist_print (ret, "\t"); + rl_on_new_line (); + } +#endif + + /* Now we start generating completions based on the other members of CS. */ + if (cs->globpat) + { + tmatches = gen_globpat_matches (cs, word); + if (tmatches) + { +#ifdef DEBUG + if (progcomp_debug) + { + debug_printf ("gen_globpat_matches (%p, %s) -->", cs, word); + strlist_print (tmatches, "\t"); + rl_on_new_line (); + } +#endif + ret = strlist_append (ret, tmatches); + strlist_dispose (tmatches); + rl_filename_completion_desired = 1; + } + } + + if (cs->words) + { + tmatches = gen_wordlist_matches (cs, word); + if (tmatches) + { +#ifdef DEBUG + if (progcomp_debug) + { + debug_printf ("gen_wordlist_matches (%p, %s) -->", cs, word); + strlist_print (tmatches, "\t"); + rl_on_new_line (); + } +#endif + ret = strlist_append (ret, tmatches); + strlist_dispose (tmatches); + } + } + + lwords = (WORD_LIST *)NULL; + line = (char *)NULL; + if (cs->command || cs->funcname) + { + /* If we have a command or function to execute, we need to first break + the command line into individual words, find the number of words, + and find the word in the list containing the word to be completed. */ + line = substring (rl_line_buffer, start, end); + llen = end - start; + +#ifdef DEBUG + debug_printf ("command_line_to_word_list (%s, %d, %d, %p, %p)", + line, llen, rl_point - start, &nw, &cw); +#endif + lwords = command_line_to_word_list (line, llen, rl_point - start, &nw, &cw); +#ifdef DEBUG + if (lwords == 0 && llen > 0) + debug_printf ("ERROR: command_line_to_word_list returns NULL"); + else if (progcomp_debug) + { + debug_printf ("command_line_to_word_list -->"); + printf ("\t"); + print_word_list (lwords, "!"); + printf ("\n"); + fflush(stdout); + rl_on_new_line (); + } +#endif + } + + if (cs->funcname) + { + tmatches = gen_shell_function_matches (cs, word, line, rl_point - start, lwords, nw, cw); + if (tmatches) + { +#ifdef DEBUG + if (progcomp_debug) + { + debug_printf ("gen_shell_function_matches (%p, %s, %p, %d, %d) -->", cs, word, lwords, nw, cw); + strlist_print (tmatches, "\t"); + rl_on_new_line (); + } +#endif + ret = strlist_append (ret, tmatches); + strlist_dispose (tmatches); + } + } + + if (cs->command) + { + tmatches = gen_command_matches (cs, word, line, rl_point - start, lwords, nw, cw); + if (tmatches) + { +#ifdef DEBUG + if (progcomp_debug) + { + debug_printf ("gen_command_matches (%p, %s, %p, %d, %d) -->", cs, word, lwords, nw, cw); + strlist_print (tmatches, "\t"); + rl_on_new_line (); + } +#endif + ret = strlist_append (ret, tmatches); + strlist_dispose (tmatches); + } + } + + if (cs->command || cs->funcname) + { + if (lwords) + dispose_words (lwords); + FREE (line); + } + + if (cs->filterpat) + { + tmatches = filter_stringlist (ret, cs->filterpat, word); +#ifdef DEBUG + if (progcomp_debug) + { + debug_printf ("filter_stringlist (%p, %s, %s) -->", ret, cs->filterpat, word); + strlist_print (tmatches, "\t"); + rl_on_new_line (); + } +#endif + if (ret && ret != tmatches) + { + FREE (ret->list); + free (ret); + } + ret = tmatches; + } + + if (cs->prefix || cs->suffix) + ret = strlist_prefix_suffix (ret, cs->prefix, cs->suffix); + + /* If no matches have been generated and the user has specified that + directory completion should be done as a default, call + gen_action_completions again to generate a list of matching directory + names. */ + if ((ret == 0 || ret->list_len == 0) && (cs->options & COPT_DIRNAMES)) + { + tcs = compspec_create (); + tcs->actions = CA_DIRECTORY; + ret = gen_action_completions (tcs, word); + compspec_dispose (tcs); + } + else if (cs->options & COPT_PLUSDIRS) + { + tcs = compspec_create (); + tcs->actions = CA_DIRECTORY; + tmatches = gen_action_completions (tcs, word); + ret = strlist_append (ret, tmatches); + strlist_dispose (tmatches); + compspec_dispose (tcs); + } + + return (ret); +} + +/* The driver function for the programmable completion code. Returns a list + of matches for WORD, which is an argument to command CMD. START and END + bound the command currently being completed in rl_line_buffer. */ +char ** +programmable_completions (cmd, word, start, end, foundp) + const char *cmd; + const char *word; + int start, end, *foundp; +{ + COMPSPEC *cs; + STRINGLIST *ret; + char **rmatches, *t; + + /* We look at the basename of CMD if the full command does not have + an associated COMPSPEC. */ + cs = progcomp_search (cmd); + if (cs == 0) + { + t = strrchr (cmd, '/'); + if (t) + cs = progcomp_search (++t); + } + if (cs == 0) + { + if (foundp) + *foundp = 0; + return ((char **)NULL); + } + + cs = compspec_copy (cs); + + /* Signal the caller that we found a COMPSPEC for this command, and pass + back any meta-options associated with the compspec. */ + if (foundp) + *foundp = 1|cs->options; + + ret = gen_compspec_completions (cs, cmd, word, start, end); + + compspec_dispose (cs); + + if (ret) + { + rmatches = ret->list; + free (ret); + } + else + rmatches = (char **)NULL; + + return (rmatches); +} + +#endif /* PROGRAMMABLE_COMPLETION */ diff --git a/subst.c b/subst.c index 4fde3b841..c449a830a 100644 --- a/subst.c +++ b/subst.c @@ -4770,7 +4770,7 @@ parameter_brace_expand_length (name) FREE (t); } #if defined (ARRAY_VARS) - else if ((var = find_variable (name + 1)) && array_p (var)) + else if ((var = find_variable (name + 1)) && (invisible_p (var) == 0) && array_p (var)) { t = array_reference (array_cell (var), 0); number = MB_STRLEN (t); @@ -5002,7 +5002,7 @@ get_var_and_type (varname, value, quoted, varp, valp) else return -1; } - else if ((v = find_variable (varname)) && array_p (v)) + else if ((v = find_variable (varname)) && (invisible_p (v) == 0) && array_p (v)) { vtype = VT_ARRAYMEMBER; *varp = v; diff --git a/subst.c~ b/subst.c~ index 02bdc57d6..e8bc9f65f 100644 --- a/subst.c~ +++ b/subst.c~ @@ -4770,7 +4770,7 @@ parameter_brace_expand_length (name) FREE (t); } #if defined (ARRAY_VARS) - else if ((var = find_variable (name + 1)) && array_p (var)) + else if ((var = find_variable (name + 1)) && (invisible_p (var) == 0) && array_p (var)) { t = array_reference (array_cell (var), 0); number = MB_STRLEN (t); @@ -4891,7 +4891,7 @@ verify_substring_values (value, substr, vtype, e1p, e2p) { case VT_VARIABLE: case VT_ARRAYMEMBER: - len = strlen (value); + len = MB_STRLEN (value); break; case VT_POSPARMS: len = number_of_args () + 1; @@ -5002,7 +5002,7 @@ get_var_and_type (varname, value, quoted, varp, valp) else return -1; } - else if ((v = find_variable (varname)) && array_p (v)) + else if ((v = find_variable (varname)) && invisible_p (v) == 0 && array_p (v)) { vtype = VT_ARRAYMEMBER; *varp = v; diff --git a/tests/dbg-support.tests b/tests/dbg-support.tests index 27825d6ae..3a5e4ae8a 100755 --- a/tests/dbg-support.tests +++ b/tests/dbg-support.tests @@ -62,8 +62,8 @@ set -o functrace trap 'print_debug_trap $LINENO' DEBUG trap 'print_return_trap $LINENO' RETURN -# Funcname is now an array. Vanilla Bash 2.05 doesn't have FUNCNAME array. -echo "FUNCNAME" ${FUNCNAME[0]} +# Funcname is now an array, but you still can't see it outside a function +echo "FUNCNAME" ${FUNCNAME[0]:-main} # We should trace into the below. # Start easy with a simple function. diff --git a/tests/dbg-support.tests~ b/tests/dbg-support.tests~ new file mode 100755 index 000000000..1aa3316d4 --- /dev/null +++ b/tests/dbg-support.tests~ @@ -0,0 +1,139 @@ +#!../bash +# +# Test correct functioning bash debug support not via the bashdb +# debugger but merely by printing via print_trap() +# $Id: dbg-support.tests,v 1.13 2003/02/17 22:02:25 rockyb Exp $ +shopt -s extdebug +print_debug_trap() { + echo "debug lineno: $1 ${FUNCNAME[1]}" + return +} + +print_return_trap() { + echo "return lineno: $1 ${FUNCNAME[1]}" + return +} + +fn1() { + echo "LINENO $LINENO" + echo "LINENO $LINENO" + echo "BASH_SOURCE[0]" ${BASH_SOURCE[0]} + echo "FUNCNAME[0]" ${FUNCNAME[0]} + echo `caller` + echo `caller 0` + echo `caller 1` + echo `caller foo` +} + +fn2() { + echo "fn2 here. Calling fn1..." + fn1 +} + +fn3() { + echo "LINENO $LINENO" + echo "BASH_SOURCE[0]" ${BASH_SOURCE[0]} + + # Print a stack trace + declare -i n + n=${#FUNCNAME[@]} + for (( i=0 ; (( i < $n )) ; i++ )) ; do + local -i j=i+1 + [ $j -eq $n ] && j=i # main()'s file is the same as the first caller + echo "${FUNCNAME[$i]} called from file " \ + "\`${BASH_SOURCE[$j]}' at line ${BASH_LINENO[$j]}" + done + source ./dbg-support.sub +} + +fn4() { + echo "fn4 here. Calling fn3..." + fn3 +} + + +#!../bash +# +# Test of support for debugging facilities in bash +# +# Test debugger set option fntrace - set on. Not in vanilla Bash 2.05 +# +set -o functrace +trap 'print_debug_trap $LINENO' DEBUG +trap 'print_return_trap $LINENO' RETURN + +# Funcname is now an array. Vanilla Bash 2.05 doesn't have FUNCNAME array. +echo "FUNCNAME" ${FUNCNAME[0]:-main} + +# We should trace into the below. +# Start easy with a simple function. +fn1 +fn2 +fn3 +source ./dbg-support.sub + +# Test debugger set option fntrace - set off +set +T + +# We should not trace into this. +fn1 +fn2 +fn3 +fn4 +source ./dbg-support.sub + +# Another way to say: set -o fntrace +set -T + +# We should trace into this. +source ./dbg-support.sub +set +T + +# Test that the line numbers in the presence of conditionals are correct. +for (( i=0 ; (( i <= 2 )) ; i++ )) ; do + if [ $i -eq 2 ] ; then + echo "Hit 2" + fi + j=4 +done + +# +# Check line numbers in command substitution +# +echo $(sourced_fn) +echo `sourced_fn` +x=$((sourced_fn)) +x={ sourced_fn } + +# Make sure we step into sourced_fn as a comand when we request to do so. +# Vanilla bash 2.0 doesn't do. +set -o functrace +x={ sourced_fn } + +# Should see line number of xyzzy below. Vanilla bash 2.05b doesn't do +case xyzzy in + a ) + x=5 + ;; + xyzz? ) + case 3 in + 2 ) + x=6 ;; + 3 ) + echo "got it" ;; + * ) echo "no good" ;; + esac + ;; + * ) +esac + +# Should see line numbers for initial for lines. +for i in 0 1 ; do + for j in 3 4 ; do + ((x=i+j)) + done +done +#;;; Local Variables: *** +#;;; mode:shell-script *** +#;;; eval: (sh-set-shell "bash") *** +#;;; End: *** diff --git a/variables.c b/variables.c index 75f16cd9f..f32e2dc1f 100644 --- a/variables.c +++ b/variables.c @@ -1419,11 +1419,11 @@ initialize_dynamic_variables () v = init_dynamic_array_var ("GROUPS", get_groupset, null_array_assign, att_noassign); # if defined (DEBUGGER) - v = init_dynamic_array_var ("BASH_ARGC", get_self, null_array_assign, (att_invisible|att_noassign)); - v = init_dynamic_array_var ("BASH_ARGV", get_self, null_array_assign, (att_invisible|att_noassign)); + v = init_dynamic_array_var ("BASH_ARGC", get_self, null_array_assign, att_noassign); + v = init_dynamic_array_var ("BASH_ARGV", get_self, null_array_assign, att_noassign); # endif /* DEBUGGER */ - v = init_dynamic_array_var ("BASH_SOURCE", get_self, null_array_assign, (att_invisible|att_noassign)); - v = init_dynamic_array_var ("BASH_LINENO", get_self, null_array_assign, (att_invisible|att_noassign)); + v = init_dynamic_array_var ("BASH_SOURCE", get_self, null_array_assign, att_noassign); + v = init_dynamic_array_var ("BASH_LINENO", get_self, null_array_assign, att_noassign); #endif v = init_funcname_var (); diff --git a/variables.c~ b/variables.c~ index dc876de6a..75f16cd9f 100644 --- a/variables.c~ +++ b/variables.c~ @@ -2302,13 +2302,18 @@ makunbound (name, vc) We also need to add it back into the correct hash table. */ if (old_var && local_p (old_var) && variable_context == old_var->context) { +#if defined (ARRAY_VARS) + if (array_p (old_var)) + array_dispose (array_cell (old_var)); + else +#endif + FREE (value_cell (old_var)); /* Reset the attributes. Preserve the export attribute if the variable came from a temporary environment. Make sure it stays local, and make it invisible. */ old_var->attributes = (exported_p (old_var) && tempvar_p (old_var)) ? att_exported : 0; VSETATTR (old_var, att_local); VSETATTR (old_var, att_invisible); - FREE (value_cell (old_var)); var_setvalue (old_var, (char *)NULL); INVALIDATE_EXPORTSTR (old_var); @@ -3646,6 +3651,7 @@ static struct name_and_function special_vars[] = { { "LC_CTYPE", sv_locale }, { "LC_MESSAGES", sv_locale }, { "LC_NUMERIC", sv_locale }, + { "LC_TIME", sv_locale }, { "MAIL", sv_mail }, { "MAILCHECK", sv_mail },