From 8a9c66f622d6e5d858e929da8b150fb6db6b4303 Mon Sep 17 00:00:00 2001 From: Chet Ramey Date: Sat, 3 Dec 2011 13:34:30 -0500 Subject: [PATCH] commit bash-20040803 snapshot --- CWRU/CWRU.chlog | 23 + CWRU/CWRU.chlog~ | 28 + arrayfunc.c~ | 4 + braces.c | 4 +- builtins/printf.def | 8 + doc/bashref.aux | 106 +- doc/bashref.bt | 22 +- doc/bashref.bts | 22 +- doc/bashref.cp | 56 +- doc/bashref.cps | 56 +- doc/bashref.dvi | Bin 580108 -> 580500 bytes doc/bashref.fn | 192 +- doc/bashref.fns | 192 +- doc/bashref.html | 24 +- doc/bashref.info | 1950 ++- doc/bashref.log | 68 +- doc/bashref.ps | 24476 +++++++++++++++++-------------------- doc/bashref.toc | 110 +- doc/bashref.vr | 46 +- doc/bashref.vrs | 46 +- doc/faq.headers.mail | 2 +- doc/faq.headers.news | 2 +- doc/faq.headers.news2 | 2 +- doc/faq.mail | 147 +- doc/faq.news | 147 +- doc/faq.news2 | 147 +- doc/faq.version | 6 +- pcomplete.c | 4 + pcomplete.c~ | 1384 +++ subst.c | 4 +- subst.c~ | 6 +- tests/dbg-support.tests | 4 +- tests/dbg-support.tests~ | 139 + variables.c | 8 +- variables.c~ | 8 +- 35 files changed, 14635 insertions(+), 14808 deletions(-) create mode 100644 pcomplete.c~ create mode 100755 tests/dbg-support.tests~ diff --git a/CWRU/CWRU.chlog b/CWRU/CWRU.chlog index 360cd583..c4f732b8 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 3380cc7b..7bab2325 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 a00f17f8..a1738650 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 0fb9b9d7..8ebfb4fa 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 9b377a93..d9719b82 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 232ba2b4..eb0bc7c6 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 ddaba555..4fb768a3 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 756c131f..16a53f67 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 1d42b6ca..99e410c8 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 15801643..2cd5de32 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 f8894897384e7b962eb6ee6896ccf40b499f7454..03fd45dac9e07c017425787012361348015c9299 100644 GIT binary patch delta 5924 zcmZ8lcU)EF8|OXq3{1-^$jZ%8Oc9Y? z-r<`TXQ$>DD221jhF?ibEwH31ttuQJ#`6umtr0vEIgVI=q7S-~qt^4WJtIl2)jh*Z zxcDe*Qsxwm)@CIW(%mZ097>2uc_q7v#8?Ao1rQ{OIb)G1Rk@GwzjSs3iB-nUxju5WhBnpls}D-cqOv%G5&X)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UK_g< zKhE|qb_L}v!3`gEv@kM}htnQr`>Nrr|9{j6O<{Dp8Y+z31jXq%J}V5qEmCb5DOu;o zTF+K@xf3Hhw@lsRPAqI`m3mM_ne?vurh@YG57Z<9rS}%~6)sb@si7FAl}-Op%@X*J z+8yd-=Z`@SwVyjjwj5C>N&H8%&(u#u=uw2;XDxw=MXH4*oKVk*e9Y%7wXM^v%V~9> zld=4adfT9}zDNq}ye|d9`?YGZV6{QqkLo>?tkqRD(y5+yOdIBkQFx-EVR)hBIcTq?seCyU>u3duhfqEJ9v6%3PXEBC zzuf5>Vu4BnjSvMN1xSE83~$y8)3(~I(AtBJ6TaNW!2$%kKIWk6N$;TH15dh(nBjdd z`V~G+@uvIGMU)S6TR`VaPvO%gUpfQDAV2ymsw6e0nL_y;PR8%<5d`T2RljUhR{$UC{*r!+{ob0k%lDmUJOc z)0eI29eC!B-jB4Vw{c)=8>-@+A9jc0JdCh03PChR=WP{>dfgJ9(yDdE@EicYkcXv{BoVVy}1V}rX;`~$=c z=Z>qrDg3Dd$Q%uvvZZseBnw`@ zv(qM+Ft%U?6}ViylD2c+CHI%n$3l#i?Ez{Mh?(75McX1Z_^hVSk=dt`zUO2*xR!T8 zJo9;%#&OwmJv}ACfdnl0kZW)?f!f%N59mrBjmK8n#DKEhLAqBWMt1dM+TDY{XGEN) zt7WWS&A0T7*fQR^_5INZFJffQ^20$L@OIuvyeZ84)}{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 105b9a94..aa7cd768 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 0189bd46..80405a98 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 4fde3b84..c449a830 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 02bdc57d..e8bc9f65 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 27825d6a..3a5e4ae8 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 00000000..1aa3316d --- /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 75f16cd9..f32e2dc1 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 dc876de6..75f16cd9 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 },