mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-07-07 20:30:52 +02:00
another set of documentation updates; fix readline problem with history entry undo list corruption
This commit is contained in:
@@ -10717,3 +10717,27 @@ builtins/printf.def
|
||||
Makefile.in,doc/Makefile.in
|
||||
- uninstall: make sure the bash-specific directories created by
|
||||
`make install' are emptied and removed
|
||||
|
||||
11/27
|
||||
-----
|
||||
doc/bash.1,doc/bashref.texi
|
||||
lib/readline/doc/readline.3,lib/readline/doc/history.3
|
||||
lib/readline/doc/rluser.texi,lib/readline/doc/rltech.texi
|
||||
- another set of updates for formatting consistency, language
|
||||
consistency between man pages and info files
|
||||
|
||||
12/1
|
||||
----
|
||||
lib/readline/misc.c
|
||||
- rl_get_previous_history: call _rl_maybe_replace_line with arg of 1
|
||||
so it clears rl_undo_list, since this may not immediately replace
|
||||
rl_undo_list with something from history
|
||||
Report from Grisha Levit <grishalevit@gmail.com>
|
||||
|
||||
12/5
|
||||
----
|
||||
doc/bash.1,doc/bashref.texi
|
||||
lib/readline/doc/rluser.texi
|
||||
- updates for active voice, future tense, formatting and fonts, edits
|
||||
to Programmable Completion
|
||||
Suggestions from G. Branden Robinson <g.branden.robinson@gmail.com>
|
||||
|
||||
@@ -32,7 +32,7 @@ on disk when a function with the same name exists.
|
||||
Options:
|
||||
-p use a default value for PATH that is guaranteed to find all of
|
||||
the standard utilities
|
||||
-v print a single-word indicating the command or filename that
|
||||
-v print a single word indicating the command or filename that
|
||||
invokes COMMAND
|
||||
-V print a more verbose description of each COMMAND
|
||||
|
||||
|
||||
@@ -213,6 +213,10 @@ bashref.ps: bashref.dvi
|
||||
bashref.pdf: bashref.texi
|
||||
bash.pdf: bash.1
|
||||
|
||||
builtins.pdf: builtins.1 bash.1
|
||||
$(RM) $@
|
||||
-${GROFF} -I${srcdir} -man -T pdf builtins.1 > $@
|
||||
|
||||
article.pdf: article.ps
|
||||
rose94.pdf: rose94.ps
|
||||
|
||||
|
||||
+2234
-2200
File diff suppressed because it is too large
Load Diff
+359
-235
File diff suppressed because it is too large
Load Diff
+418
-250
File diff suppressed because it is too large
Load Diff
+542
-517
File diff suppressed because it is too large
Load Diff
Binary file not shown.
+30
-30
@@ -125,10 +125,10 @@
|
||||
@xrdef{Executing Commands-snt}{Section@tie 3.7}
|
||||
@xrdef{Simple Command Expansion-title}{Simple Command Expansion}
|
||||
@xrdef{Simple Command Expansion-snt}{Section@tie 3.7.1}
|
||||
@xrdef{Command Search and Execution-title}{Command Search and Execution}
|
||||
@xrdef{Command Search and Execution-snt}{Section@tie 3.7.2}
|
||||
@xrdef{Executing Commands-pg}{44}
|
||||
@xrdef{Simple Command Expansion-pg}{44}
|
||||
@xrdef{Command Search and Execution-title}{Command Search and Execution}
|
||||
@xrdef{Command Search and Execution-snt}{Section@tie 3.7.2}
|
||||
@xrdef{Command Execution Environment-title}{Command Execution Environment}
|
||||
@xrdef{Command Execution Environment-snt}{Section@tie 3.7.3}
|
||||
@xrdef{Command Search and Execution-pg}{45}
|
||||
@@ -138,9 +138,9 @@
|
||||
@xrdef{Environment-pg}{46}
|
||||
@xrdef{Exit Status-title}{Exit Status}
|
||||
@xrdef{Exit Status-snt}{Section@tie 3.7.5}
|
||||
@xrdef{Exit Status-pg}{47}
|
||||
@xrdef{Signals-title}{Signals}
|
||||
@xrdef{Signals-snt}{Section@tie 3.7.6}
|
||||
@xrdef{Exit Status-pg}{47}
|
||||
@xrdef{Signals-pg}{48}
|
||||
@xrdef{Shell Scripts-title}{Shell Scripts}
|
||||
@xrdef{Shell Scripts-snt}{Section@tie 3.8}
|
||||
@@ -309,82 +309,82 @@
|
||||
@xrdef{Programmable Completion-pg}{156}
|
||||
@xrdef{Programmable Completion Builtins-title}{Programmable Completion Builtins}
|
||||
@xrdef{Programmable Completion Builtins-snt}{Section@tie 8.7}
|
||||
@xrdef{Programmable Completion Builtins-pg}{158}
|
||||
@xrdef{Programmable Completion Builtins-pg}{159}
|
||||
@xrdef{A Programmable Completion Example-title}{A Programmable Completion Example}
|
||||
@xrdef{A Programmable Completion Example-snt}{Section@tie 8.8}
|
||||
@xrdef{A Programmable Completion Example-pg}{162}
|
||||
@xrdef{A Programmable Completion Example-pg}{163}
|
||||
@xrdef{Using History Interactively-title}{Using History Interactively}
|
||||
@xrdef{Using History Interactively-snt}{Chapter@tie 9}
|
||||
@xrdef{Bash History Facilities-title}{Bash History Facilities}
|
||||
@xrdef{Bash History Facilities-snt}{Section@tie 9.1}
|
||||
@xrdef{Using History Interactively-pg}{165}
|
||||
@xrdef{Bash History Facilities-pg}{165}
|
||||
@xrdef{Using History Interactively-pg}{166}
|
||||
@xrdef{Bash History Facilities-pg}{166}
|
||||
@xrdef{Bash History Builtins-title}{Bash History Builtins}
|
||||
@xrdef{Bash History Builtins-snt}{Section@tie 9.2}
|
||||
@xrdef{Bash History Builtins-pg}{166}
|
||||
@xrdef{Bash History Builtins-pg}{167}
|
||||
@xrdef{History Interaction-title}{History Expansion}
|
||||
@xrdef{History Interaction-snt}{Section@tie 9.3}
|
||||
@xrdef{History Interaction-pg}{168}
|
||||
@xrdef{History Interaction-pg}{169}
|
||||
@xrdef{Event Designators-title}{Event Designators}
|
||||
@xrdef{Event Designators-snt}{Section@tie 9.3.1}
|
||||
@xrdef{Event Designators-pg}{169}
|
||||
@xrdef{Event Designators-pg}{170}
|
||||
@xrdef{Word Designators-title}{Word Designators}
|
||||
@xrdef{Word Designators-snt}{Section@tie 9.3.2}
|
||||
@xrdef{Modifiers-title}{Modifiers}
|
||||
@xrdef{Modifiers-snt}{Section@tie 9.3.3}
|
||||
@xrdef{Word Designators-pg}{170}
|
||||
@xrdef{Modifiers-pg}{171}
|
||||
@xrdef{Word Designators-pg}{171}
|
||||
@xrdef{Modifiers-pg}{172}
|
||||
@xrdef{Installing Bash-title}{Installing Bash}
|
||||
@xrdef{Installing Bash-snt}{Chapter@tie 10}
|
||||
@xrdef{Basic Installation-title}{Basic Installation}
|
||||
@xrdef{Basic Installation-snt}{Section@tie 10.1}
|
||||
@xrdef{Installing Bash-pg}{172}
|
||||
@xrdef{Basic Installation-pg}{172}
|
||||
@xrdef{Installing Bash-pg}{173}
|
||||
@xrdef{Basic Installation-pg}{173}
|
||||
@xrdef{Compilers and Options-title}{Compilers and Options}
|
||||
@xrdef{Compilers and Options-snt}{Section@tie 10.2}
|
||||
@xrdef{Compiling For Multiple Architectures-title}{Compiling For Multiple Architectures}
|
||||
@xrdef{Compiling For Multiple Architectures-snt}{Section@tie 10.3}
|
||||
@xrdef{Installation Names-title}{Installation Names}
|
||||
@xrdef{Installation Names-snt}{Section@tie 10.4}
|
||||
@xrdef{Compilers and Options-pg}{173}
|
||||
@xrdef{Compiling For Multiple Architectures-pg}{173}
|
||||
@xrdef{Compilers and Options-pg}{174}
|
||||
@xrdef{Compiling For Multiple Architectures-pg}{174}
|
||||
@xrdef{Specifying the System Type-title}{Specifying the System Type}
|
||||
@xrdef{Specifying the System Type-snt}{Section@tie 10.5}
|
||||
@xrdef{Sharing Defaults-title}{Sharing Defaults}
|
||||
@xrdef{Sharing Defaults-snt}{Section@tie 10.6}
|
||||
@xrdef{Operation Controls-title}{Operation Controls}
|
||||
@xrdef{Operation Controls-snt}{Section@tie 10.7}
|
||||
@xrdef{Installation Names-pg}{174}
|
||||
@xrdef{Specifying the System Type-pg}{174}
|
||||
@xrdef{Sharing Defaults-pg}{174}
|
||||
@xrdef{Installation Names-pg}{175}
|
||||
@xrdef{Specifying the System Type-pg}{175}
|
||||
@xrdef{Sharing Defaults-pg}{175}
|
||||
@xrdef{Optional Features-title}{Optional Features}
|
||||
@xrdef{Optional Features-snt}{Section@tie 10.8}
|
||||
@xrdef{Operation Controls-pg}{175}
|
||||
@xrdef{Optional Features-pg}{175}
|
||||
@xrdef{Operation Controls-pg}{176}
|
||||
@xrdef{Optional Features-pg}{176}
|
||||
@xrdef{Reporting Bugs-title}{Reporting Bugs}
|
||||
@xrdef{Reporting Bugs-snt}{Appendix@tie @char65{}}
|
||||
@xrdef{Reporting Bugs-pg}{181}
|
||||
@xrdef{Reporting Bugs-pg}{182}
|
||||
@xrdef{Major Differences From The Bourne Shell-title}{Major Differences From The Bourne Shell}
|
||||
@xrdef{Major Differences From The Bourne Shell-snt}{Appendix@tie @char66{}}
|
||||
@xrdef{Major Differences From The Bourne Shell-pg}{182}
|
||||
@xrdef{Major Differences From The Bourne Shell-pg}{183}
|
||||
@xrdef{GNU Free Documentation License-title}{GNU Free Documentation License}
|
||||
@xrdef{GNU Free Documentation License-snt}{Appendix@tie @char67{}}
|
||||
@xrdef{GNU Free Documentation License-pg}{189}
|
||||
@xrdef{GNU Free Documentation License-pg}{190}
|
||||
@xrdef{Indexes-title}{Indexes}
|
||||
@xrdef{Indexes-snt}{Appendix@tie @char68{}}
|
||||
@xrdef{Builtin Index-title}{Index of Shell Builtin Commands}
|
||||
@xrdef{Builtin Index-snt}{Section@tie @char68.1}
|
||||
@xrdef{Indexes-pg}{197}
|
||||
@xrdef{Builtin Index-pg}{197}
|
||||
@xrdef{Indexes-pg}{198}
|
||||
@xrdef{Builtin Index-pg}{198}
|
||||
@xrdef{Reserved Word Index-title}{Index of Shell Reserved Words}
|
||||
@xrdef{Reserved Word Index-snt}{Section@tie @char68.2}
|
||||
@xrdef{Variable Index-title}{Parameter and Variable Index}
|
||||
@xrdef{Variable Index-snt}{Section@tie @char68.3}
|
||||
@xrdef{Reserved Word Index-pg}{198}
|
||||
@xrdef{Variable Index-pg}{199}
|
||||
@xrdef{Reserved Word Index-pg}{199}
|
||||
@xrdef{Variable Index-pg}{200}
|
||||
@xrdef{Function Index-title}{Function Index}
|
||||
@xrdef{Function Index-snt}{Section@tie @char68.4}
|
||||
@xrdef{Function Index-pg}{201}
|
||||
@xrdef{Function Index-pg}{202}
|
||||
@xrdef{Concept Index-title}{Concept Index}
|
||||
@xrdef{Concept Index-snt}{Section@tie @char68.5}
|
||||
@xrdef{Concept Index-pg}{203}
|
||||
@xrdef{Concept Index-pg}{204}
|
||||
|
||||
+3
-3
@@ -54,8 +54,8 @@
|
||||
\entry{wait}{126}{\code {wait}}
|
||||
\entry{disown}{126}{\code {disown}}
|
||||
\entry{suspend}{126}{\code {suspend}}
|
||||
\entry{compgen}{158}{\code {compgen}}
|
||||
\entry{compgen}{159}{\code {compgen}}
|
||||
\entry{complete}{159}{\code {complete}}
|
||||
\entry{compopt}{162}{\code {compopt}}
|
||||
\entry{fc}{166}{\code {fc}}
|
||||
\entry{history}{166}{\code {history}}
|
||||
\entry{fc}{167}{\code {fc}}
|
||||
\entry{history}{167}{\code {history}}
|
||||
|
||||
+3
-3
@@ -15,7 +15,7 @@
|
||||
\entry{\code {caller}}{62}
|
||||
\entry{\code {cd}}{52}
|
||||
\entry{\code {command}}{62}
|
||||
\entry{\code {compgen}}{158}
|
||||
\entry{\code {compgen}}{159}
|
||||
\entry{\code {complete}}{159}
|
||||
\entry{\code {compopt}}{162}
|
||||
\entry{\code {continue}}{53}
|
||||
@@ -32,14 +32,14 @@
|
||||
\entry{\code {export}}{53}
|
||||
\initial {F}
|
||||
\entry{\code {false}}{54}
|
||||
\entry{\code {fc}}{166}
|
||||
\entry{\code {fc}}{167}
|
||||
\entry{\code {fg}}{125}
|
||||
\initial {G}
|
||||
\entry{\code {getopts}}{54}
|
||||
\initial {H}
|
||||
\entry{\code {hash}}{55}
|
||||
\entry{\code {help}}{66}
|
||||
\entry{\code {history}}{166}
|
||||
\entry{\code {history}}{167}
|
||||
\initial {J}
|
||||
\entry{\code {jobs}}{125}
|
||||
\initial {K}
|
||||
|
||||
+12
-12
@@ -116,15 +116,15 @@
|
||||
\entry{initialization file, readline}{131}{initialization file, readline}
|
||||
\entry{variables, readline}{132}{variables, readline}
|
||||
\entry{programmable completion}{156}{programmable completion}
|
||||
\entry{completion builtins}{158}{completion builtins}
|
||||
\entry{History, how to use}{164}{History, how to use}
|
||||
\entry{command history}{165}{command history}
|
||||
\entry{history list}{165}{history list}
|
||||
\entry{history builtins}{166}{history builtins}
|
||||
\entry{history expansion}{168}{history expansion}
|
||||
\entry{event designators}{169}{event designators}
|
||||
\entry{history events}{169}{history events}
|
||||
\entry{installation}{172}{installation}
|
||||
\entry{configuration}{172}{configuration}
|
||||
\entry{Bash installation}{172}{Bash installation}
|
||||
\entry{Bash configuration}{172}{Bash configuration}
|
||||
\entry{completion builtins}{159}{completion builtins}
|
||||
\entry{History, how to use}{165}{History, how to use}
|
||||
\entry{command history}{166}{command history}
|
||||
\entry{history list}{166}{history list}
|
||||
\entry{history builtins}{167}{history builtins}
|
||||
\entry{history expansion}{169}{history expansion}
|
||||
\entry{event designators}{170}{event designators}
|
||||
\entry{history events}{170}{history events}
|
||||
\entry{installation}{173}{installation}
|
||||
\entry{configuration}{173}{configuration}
|
||||
\entry{Bash installation}{173}{Bash installation}
|
||||
\entry{Bash configuration}{173}{Bash configuration}
|
||||
|
||||
+12
-12
@@ -7,8 +7,8 @@
|
||||
\entry{arrays}{109}
|
||||
\initial {B}
|
||||
\entry{background}{123}
|
||||
\entry{Bash configuration}{172}
|
||||
\entry{Bash installation}{172}
|
||||
\entry{Bash configuration}{173}
|
||||
\entry{Bash installation}{173}
|
||||
\entry{binary arithmetic operators}{107}
|
||||
\entry{bitwise arithmetic operators}{107}
|
||||
\entry{Bourne shell}{5}
|
||||
@@ -18,7 +18,7 @@
|
||||
\entry{command editing}{129}
|
||||
\entry{command execution}{45}
|
||||
\entry{command expansion}{44}
|
||||
\entry{command history}{165}
|
||||
\entry{command history}{166}
|
||||
\entry{command search}{45}
|
||||
\entry{command substitution}{35}
|
||||
\entry{command timing}{10}
|
||||
@@ -33,9 +33,9 @@
|
||||
\entry{comments, shell}{9}
|
||||
\entry{Compatibility Level}{120}
|
||||
\entry{Compatibility Mode}{120}
|
||||
\entry{completion builtins}{158}
|
||||
\entry{completion builtins}{159}
|
||||
\entry{conditional arithmetic operator}{107}
|
||||
\entry{configuration}{172}
|
||||
\entry{configuration}{173}
|
||||
\entry{control operator}{3}
|
||||
\entry{coprocess}{18}
|
||||
\initial {D}
|
||||
@@ -45,7 +45,7 @@
|
||||
\entry{editing command lines}{129}
|
||||
\entry{environment}{46}
|
||||
\entry{evaluation, arithmetic}{106}
|
||||
\entry{event designators}{169}
|
||||
\entry{event designators}{170}
|
||||
\entry{execution environment}{45}
|
||||
\entry{exit status}{3, 47}
|
||||
\entry{expansion}{24}
|
||||
@@ -64,15 +64,15 @@
|
||||
\entry{foreground}{123}
|
||||
\entry{functions, shell}{19}
|
||||
\initial {H}
|
||||
\entry{history builtins}{166}
|
||||
\entry{history events}{169}
|
||||
\entry{history expansion}{168}
|
||||
\entry{history list}{165}
|
||||
\entry{History, how to use}{164}
|
||||
\entry{history builtins}{167}
|
||||
\entry{history events}{170}
|
||||
\entry{history expansion}{169}
|
||||
\entry{history list}{166}
|
||||
\entry{History, how to use}{165}
|
||||
\initial {I}
|
||||
\entry{identifier}{3}
|
||||
\entry{initialization file, readline}{131}
|
||||
\entry{installation}{172}
|
||||
\entry{installation}{173}
|
||||
\entry{interaction, readline}{128}
|
||||
\entry{interactive shell}{101, 103}
|
||||
\entry{internationalization}{7}
|
||||
|
||||
+23
-22
@@ -66,6 +66,7 @@
|
||||
\entry{insert-completions (M-*)}{151}{\code {insert-completions (M-*)}}
|
||||
\entry{menu-complete ()}{151}{\code {menu-complete ()}}
|
||||
\entry{menu-complete-backward ()}{152}{\code {menu-complete-backward ()}}
|
||||
\entry{export-completions ()}{152}{\code {export-completions ()}}
|
||||
\entry{delete-char-or-list ()}{152}{\code {delete-char-or-list ()}}
|
||||
\entry{complete-filename (M-/)}{152}{\code {complete-filename (M-/)}}
|
||||
\entry{possible-filename-completions (C-x /)}{152}{\code {possible-filename-completions (C-x /)}}
|
||||
@@ -74,11 +75,11 @@
|
||||
\entry{complete-variable (M-$)}{152}{\code {complete-variable (M-$)}}
|
||||
\entry{possible-variable-completions (C-x $)}{152}{\code {possible-variable-completions (C-x $)}}
|
||||
\entry{complete-hostname (M-@)}{152}{\code {complete-hostname (M-@)}}
|
||||
\entry{possible-hostname-completions (C-x @)}{152}{\code {possible-hostname-completions (C-x @)}}
|
||||
\entry{complete-command (M-!)}{152}{\code {complete-command (M-!)}}
|
||||
\entry{possible-command-completions (C-x !)}{152}{\code {possible-command-completions (C-x !)}}
|
||||
\entry{dynamic-complete-history (M-TAB)}{152}{\code {dynamic-complete-history (M-\key {TAB})}}
|
||||
\entry{dabbrev-expand ()}{152}{\code {dabbrev-expand ()}}
|
||||
\entry{possible-hostname-completions (C-x @)}{153}{\code {possible-hostname-completions (C-x @)}}
|
||||
\entry{complete-command (M-!)}{153}{\code {complete-command (M-!)}}
|
||||
\entry{possible-command-completions (C-x !)}{153}{\code {possible-command-completions (C-x !)}}
|
||||
\entry{dynamic-complete-history (M-TAB)}{153}{\code {dynamic-complete-history (M-\key {TAB})}}
|
||||
\entry{dabbrev-expand ()}{153}{\code {dabbrev-expand ()}}
|
||||
\entry{complete-into-braces (M-{\indexlbrace })}{153}{\code {complete-into-braces (M-{\tt \char 123})}}
|
||||
\entry{start-kbd-macro (C-x ()}{153}{\code {start-kbd-macro (C-x ()}}
|
||||
\entry{end-kbd-macro (C-x ))}{153}{\code {end-kbd-macro (C-x ))}}
|
||||
@@ -86,30 +87,30 @@
|
||||
\entry{print-last-kbd-macro ()}{153}{\code {print-last-kbd-macro ()}}
|
||||
\entry{re-read-init-file (C-x C-r)}{153}{\code {re-read-init-file (C-x C-r)}}
|
||||
\entry{abort (C-g)}{153}{\code {abort (C-g)}}
|
||||
\entry{do-lowercase-version (M-A, M-B, M-x, ...{})}{153}{\code {do-lowercase-version (M-A, M-B, M-\var {x}, \dots {})}}
|
||||
\entry{prefix-meta (ESC)}{153}{\code {prefix-meta (\key {ESC})}}
|
||||
\entry{undo (C-_ or C-x C-u)}{153}{\code {undo (C-_ or C-x C-u)}}
|
||||
\entry{revert-line (M-r)}{153}{\code {revert-line (M-r)}}
|
||||
\entry{tilde-expand (M-&)}{153}{\code {tilde-expand (M-&)}}
|
||||
\entry{set-mark (C-@)}{153}{\code {set-mark (C-@)}}
|
||||
\entry{exchange-point-and-mark (C-x C-x)}{153}{\code {exchange-point-and-mark (C-x C-x)}}
|
||||
\entry{do-lowercase-version (M-A, M-B, M-x, ...{})}{154}{\code {do-lowercase-version (M-A, M-B, M-\var {x}, \dots {})}}
|
||||
\entry{prefix-meta (ESC)}{154}{\code {prefix-meta (\key {ESC})}}
|
||||
\entry{undo (C-_ or C-x C-u)}{154}{\code {undo (C-_ or C-x C-u)}}
|
||||
\entry{revert-line (M-r)}{154}{\code {revert-line (M-r)}}
|
||||
\entry{tilde-expand (M-&)}{154}{\code {tilde-expand (M-&)}}
|
||||
\entry{set-mark (C-@)}{154}{\code {set-mark (C-@)}}
|
||||
\entry{exchange-point-and-mark (C-x C-x)}{154}{\code {exchange-point-and-mark (C-x C-x)}}
|
||||
\entry{character-search (C-])}{154}{\code {character-search (C-])}}
|
||||
\entry{character-search-backward (M-C-])}{154}{\code {character-search-backward (M-C-])}}
|
||||
\entry{skip-csi-sequence ()}{154}{\code {skip-csi-sequence ()}}
|
||||
\entry{insert-comment (M-#)}{154}{\code {insert-comment (M-#)}}
|
||||
\entry{dump-functions ()}{154}{\code {dump-functions ()}}
|
||||
\entry{dump-variables ()}{154}{\code {dump-variables ()}}
|
||||
\entry{dump-macros ()}{154}{\code {dump-macros ()}}
|
||||
\entry{execute-named-command (M-x)}{154}{\code {execute-named-command (M-x)}}
|
||||
\entry{dump-functions ()}{155}{\code {dump-functions ()}}
|
||||
\entry{dump-variables ()}{155}{\code {dump-variables ()}}
|
||||
\entry{dump-macros ()}{155}{\code {dump-macros ()}}
|
||||
\entry{execute-named-command (M-x)}{155}{\code {execute-named-command (M-x)}}
|
||||
\entry{spell-correct-word (C-x s)}{155}{\code {spell-correct-word (C-x s)}}
|
||||
\entry{glob-complete-word (M-g)}{155}{\code {glob-complete-word (M-g)}}
|
||||
\entry{glob-expand-word (C-x *)}{155}{\code {glob-expand-word (C-x *)}}
|
||||
\entry{glob-list-expansions (C-x g)}{155}{\code {glob-list-expansions (C-x g)}}
|
||||
\entry{shell-expand-line (M-C-e)}{155}{\code {shell-expand-line (M-C-e)}}
|
||||
\entry{history-expand-line (M-^)}{155}{\code {history-expand-line (M-^)}}
|
||||
\entry{magic-space ()}{155}{\code {magic-space ()}}
|
||||
\entry{alias-expand-line ()}{155}{\code {alias-expand-line ()}}
|
||||
\entry{history-and-alias-expand-line ()}{155}{\code {history-and-alias-expand-line ()}}
|
||||
\entry{insert-last-argument (M-. or M-_)}{155}{\code {insert-last-argument (M-. or M-_)}}
|
||||
\entry{edit-and-execute-command (C-x C-e)}{155}{\code {edit-and-execute-command (C-x C-e)}}
|
||||
\entry{display-shell-version (C-x C-v)}{155}{\code {display-shell-version (C-x C-v)}}
|
||||
\entry{magic-space ()}{156}{\code {magic-space ()}}
|
||||
\entry{alias-expand-line ()}{156}{\code {alias-expand-line ()}}
|
||||
\entry{history-and-alias-expand-line ()}{156}{\code {history-and-alias-expand-line ()}}
|
||||
\entry{insert-last-argument (M-. or M-_)}{156}{\code {insert-last-argument (M-. or M-_)}}
|
||||
\entry{edit-and-execute-command (C-x C-e)}{156}{\code {edit-and-execute-command (C-x C-e)}}
|
||||
\entry{display-shell-version (C-x C-v)}{156}{\code {display-shell-version (C-x C-v)}}
|
||||
|
||||
+23
-22
@@ -1,7 +1,7 @@
|
||||
\initial {A}
|
||||
\entry{\code {abort (C-g)}}{153}
|
||||
\entry{\code {accept-line (Newline or Return)}}{146}
|
||||
\entry{\code {alias-expand-line ()}}{155}
|
||||
\entry{\code {alias-expand-line ()}}{156}
|
||||
\initial {B}
|
||||
\entry{\code {backward-char (C-b)}}{145}
|
||||
\entry{\code {backward-delete-char (Rubout)}}{148}
|
||||
@@ -19,7 +19,7 @@
|
||||
\entry{\code {clear-display (M-C-l)}}{146}
|
||||
\entry{\code {clear-screen (C-l)}}{146}
|
||||
\entry{\code {complete (\key {TAB})}}{151}
|
||||
\entry{\code {complete-command (M-!)}}{152}
|
||||
\entry{\code {complete-command (M-!)}}{153}
|
||||
\entry{\code {complete-filename (M-/)}}{152}
|
||||
\entry{\code {complete-hostname (M-@)}}{152}
|
||||
\entry{\code {complete-into-braces (M-{\tt \char 123})}}{153}
|
||||
@@ -29,26 +29,27 @@
|
||||
\entry{\code {copy-forward-word ()}}{150}
|
||||
\entry{\code {copy-region-as-kill ()}}{150}
|
||||
\initial {D}
|
||||
\entry{\code {dabbrev-expand ()}}{152}
|
||||
\entry{\code {dabbrev-expand ()}}{153}
|
||||
\entry{\code {delete-char (C-d)}}{148}
|
||||
\entry{\code {delete-char-or-list ()}}{152}
|
||||
\entry{\code {delete-horizontal-space ()}}{150}
|
||||
\entry{\code {digit-argument (\kbd {M-0}, \kbd {M-1}, \dots {} \kbd {M--})}}{151}
|
||||
\entry{\code {display-shell-version (C-x C-v)}}{155}
|
||||
\entry{\code {do-lowercase-version (M-A, M-B, M-\var {x}, \dots {})}}{153}
|
||||
\entry{\code {display-shell-version (C-x C-v)}}{156}
|
||||
\entry{\code {do-lowercase-version (M-A, M-B, M-\var {x}, \dots {})}}{154}
|
||||
\entry{\code {downcase-word (M-l)}}{149}
|
||||
\entry{\code {dump-functions ()}}{154}
|
||||
\entry{\code {dump-macros ()}}{154}
|
||||
\entry{\code {dump-variables ()}}{154}
|
||||
\entry{\code {dynamic-complete-history (M-\key {TAB})}}{152}
|
||||
\entry{\code {dump-functions ()}}{155}
|
||||
\entry{\code {dump-macros ()}}{155}
|
||||
\entry{\code {dump-variables ()}}{155}
|
||||
\entry{\code {dynamic-complete-history (M-\key {TAB})}}{153}
|
||||
\initial {E}
|
||||
\entry{\code {edit-and-execute-command (C-x C-e)}}{155}
|
||||
\entry{\code {edit-and-execute-command (C-x C-e)}}{156}
|
||||
\entry{\code {end-kbd-macro (C-x ))}}{153}
|
||||
\entry{\code {\i {end-of-file} (usually C-d)}}{148}
|
||||
\entry{\code {end-of-history (M->)}}{146}
|
||||
\entry{\code {end-of-line (C-e)}}{145}
|
||||
\entry{\code {exchange-point-and-mark (C-x C-x)}}{153}
|
||||
\entry{\code {execute-named-command (M-x)}}{154}
|
||||
\entry{\code {exchange-point-and-mark (C-x C-x)}}{154}
|
||||
\entry{\code {execute-named-command (M-x)}}{155}
|
||||
\entry{\code {export-completions ()}}{152}
|
||||
\initial {F}
|
||||
\entry{\code {fetch-history ()}}{148}
|
||||
\entry{\code {forward-backward-delete-char ()}}{148}
|
||||
@@ -60,7 +61,7 @@
|
||||
\entry{\code {glob-expand-word (C-x *)}}{155}
|
||||
\entry{\code {glob-list-expansions (C-x g)}}{155}
|
||||
\initial {H}
|
||||
\entry{\code {history-and-alias-expand-line ()}}{155}
|
||||
\entry{\code {history-and-alias-expand-line ()}}{156}
|
||||
\entry{\code {history-expand-line (M-^)}}{155}
|
||||
\entry{\code {history-search-backward ()}}{147}
|
||||
\entry{\code {history-search-forward ()}}{147}
|
||||
@@ -69,14 +70,14 @@
|
||||
\initial {I}
|
||||
\entry{\code {insert-comment (M-#)}}{154}
|
||||
\entry{\code {insert-completions (M-*)}}{151}
|
||||
\entry{\code {insert-last-argument (M-. or M-_)}}{155}
|
||||
\entry{\code {insert-last-argument (M-. or M-_)}}{156}
|
||||
\initial {K}
|
||||
\entry{\code {kill-line (C-k)}}{149}
|
||||
\entry{\code {kill-region ()}}{150}
|
||||
\entry{\code {kill-whole-line ()}}{150}
|
||||
\entry{\code {kill-word (M-d)}}{150}
|
||||
\initial {M}
|
||||
\entry{\code {magic-space ()}}{155}
|
||||
\entry{\code {magic-space ()}}{156}
|
||||
\entry{\code {menu-complete ()}}{151}
|
||||
\entry{\code {menu-complete-backward ()}}{152}
|
||||
\initial {N}
|
||||
@@ -88,13 +89,13 @@
|
||||
\entry{\code {operate-and-get-next (C-o)}}{148}
|
||||
\entry{\code {overwrite-mode ()}}{149}
|
||||
\initial {P}
|
||||
\entry{\code {possible-command-completions (C-x !)}}{152}
|
||||
\entry{\code {possible-command-completions (C-x !)}}{153}
|
||||
\entry{\code {possible-completions (M-?)}}{151}
|
||||
\entry{\code {possible-filename-completions (C-x /)}}{152}
|
||||
\entry{\code {possible-hostname-completions (C-x @)}}{152}
|
||||
\entry{\code {possible-hostname-completions (C-x @)}}{153}
|
||||
\entry{\code {possible-username-completions (C-x ~)}}{152}
|
||||
\entry{\code {possible-variable-completions (C-x $)}}{152}
|
||||
\entry{\code {prefix-meta (\key {ESC})}}{153}
|
||||
\entry{\code {prefix-meta (\key {ESC})}}{154}
|
||||
\entry{\code {previous-history (C-p)}}{146}
|
||||
\entry{\code {previous-screen-line ()}}{146}
|
||||
\entry{\code {print-last-kbd-macro ()}}{153}
|
||||
@@ -104,10 +105,10 @@
|
||||
\entry{\code {re-read-init-file (C-x C-r)}}{153}
|
||||
\entry{\code {redraw-current-line ()}}{146}
|
||||
\entry{\code {reverse-search-history (C-r)}}{146}
|
||||
\entry{\code {revert-line (M-r)}}{153}
|
||||
\entry{\code {revert-line (M-r)}}{154}
|
||||
\initial {S}
|
||||
\entry{\code {self-insert (a, b, A, 1, !, \dots {})}}{148}
|
||||
\entry{\code {set-mark (C-@)}}{153}
|
||||
\entry{\code {set-mark (C-@)}}{154}
|
||||
\entry{\code {shell-backward-kill-word ()}}{150}
|
||||
\entry{\code {shell-backward-word (M-C-b)}}{145}
|
||||
\entry{\code {shell-expand-line (M-C-e)}}{155}
|
||||
@@ -118,11 +119,11 @@
|
||||
\entry{\code {spell-correct-word (C-x s)}}{155}
|
||||
\entry{\code {start-kbd-macro (C-x ()}}{153}
|
||||
\initial {T}
|
||||
\entry{\code {tilde-expand (M-&)}}{153}
|
||||
\entry{\code {tilde-expand (M-&)}}{154}
|
||||
\entry{\code {transpose-chars (C-t)}}{149}
|
||||
\entry{\code {transpose-words (M-t)}}{149}
|
||||
\initial {U}
|
||||
\entry{\code {undo (C-_ or C-x C-u)}}{153}
|
||||
\entry{\code {undo (C-_ or C-x C-u)}}{154}
|
||||
\entry{\code {universal-argument ()}}{151}
|
||||
\entry{\code {unix-filename-rubout ()}}{150}
|
||||
\entry{\code {unix-line-discard (C-u)}}{149}
|
||||
|
||||
+376
-236
File diff suppressed because it is too large
Load Diff
+542
-517
File diff suppressed because it is too large
Load Diff
+38
-37
@@ -1,11 +1,12 @@
|
||||
This is pdfTeX, Version 3.141592653-2.6-1.40.26 (TeX Live 2024/MacPorts 2024.70613_0) (preloaded format=pdfetex 2024.4.9) 4 NOV 2024 18:15
|
||||
This is pdfTeX, Version 3.141592653-2.6-1.40.26 (TeX Live 2024/MacPorts 2024.70613_0) (preloaded format=pdfetex 2024.4.9) 7 DEC 2024 09:58
|
||||
entering extended mode
|
||||
restricted \write18 enabled.
|
||||
file:line:error style messages enabled.
|
||||
%&-line parsing enabled.
|
||||
**\input /usr/local/src/bash/bash-20241104/doc/bashref.texi
|
||||
(/usr/local/src/bash/bash-20241104/doc/bashref.texi
|
||||
(/usr/local/src/bash/bash-20241104/doc/texinfo.tex
|
||||
**\input /usr/local/src/bash/bash-20241126/doc/bashref.texi \input /usr/local/s
|
||||
rc/bash/bash-20241126/doc/bashref.texi
|
||||
(/usr/local/src/bash/bash-20241126/doc/bashref.texi
|
||||
(/usr/local/src/bash/bash-20241126/doc/texinfo.tex
|
||||
Loading texinfo [version 2015-11-22.14]:
|
||||
\outerhsize=\dimen16
|
||||
\outervsize=\dimen17
|
||||
@@ -161,15 +162,15 @@ This is `epsf.tex' v2.7.4 <14 February 2011>
|
||||
texinfo.tex: doing @include of version.texi
|
||||
|
||||
|
||||
(/usr/local/src/bash/bash-20241104/doc/version.texi) [1{/opt/local/var/db/texmf
|
||||
(/usr/local/src/bash/bash-20241126/doc/version.texi) [1{/opt/local/var/db/texmf
|
||||
/fonts/map/pdftex/updmap/pdftex.map}] [2]
|
||||
(/usr/local/build/bash/bash-20241104/doc/bashref.toc [-1] [-2] [-3]) [-4]
|
||||
(/usr/local/build/bash/bash-20241104/doc/bashref.toc)
|
||||
(/usr/local/build/bash/bash-20241104/doc/bashref.toc) Chapter 1
|
||||
(/usr/local/build/bash/bash-20241126/doc/bashref.toc [-1] [-2] [-3]) [-4]
|
||||
(/usr/local/build/bash/bash-20241126/doc/bashref.toc)
|
||||
(/usr/local/build/bash/bash-20241126/doc/bashref.toc) Chapter 1
|
||||
\openout0 = `bashref.toc'.
|
||||
|
||||
|
||||
(/usr/local/build/bash/bash-20241104/doc/bashref.aux)
|
||||
(/usr/local/build/bash/bash-20241126/doc/bashref.aux)
|
||||
\openout1 = `bashref.aux'.
|
||||
|
||||
[1] Chapter 2 [2]
|
||||
@@ -182,7 +183,7 @@ texinfo.tex: doing @include of version.texi
|
||||
\openout3 = `bashref.vr'.
|
||||
|
||||
[8]
|
||||
Overfull \hbox (3.12749pt too wide) in paragraph at lines 740--741
|
||||
Overfull \hbox (3.12749pt too wide) in paragraph at lines 743--744
|
||||
@texttt coproc[]|
|
||||
|
||||
@hbox(9.34993+3.85005)x43.36464
|
||||
@@ -194,7 +195,7 @@ Overfull \hbox (3.12749pt too wide) in paragraph at lines 740--741
|
||||
.etc.
|
||||
|
||||
|
||||
Overfull \hbox (3.12749pt too wide) in paragraph at lines 741--741
|
||||
Overfull \hbox (3.12749pt too wide) in paragraph at lines 744--744
|
||||
@texttt select[]|
|
||||
|
||||
@hbox(9.34993+3.85005)x43.36464
|
||||
@@ -206,7 +207,7 @@ Overfull \hbox (3.12749pt too wide) in paragraph at lines 741--741
|
||||
.etc.
|
||||
|
||||
|
||||
Overfull \hbox (5.95723pt too wide) in paragraph at lines 741--742
|
||||
Overfull \hbox (5.95723pt too wide) in paragraph at lines 744--745
|
||||
@texttt function[]|
|
||||
|
||||
@hbox(9.34993+3.85005)x52.03227
|
||||
@@ -231,7 +232,7 @@ e/fonts/enc/dvips/cm-super/cm-super-t1.enc}] [20] [21] [22] [23] [24]
|
||||
[51] [52]
|
||||
[53] [54] [55] [56] [57] [58] [59] [60] [61] [62] [63] [64] [65] [66] [67]
|
||||
[68] [69] [70] [71]
|
||||
Overfull \hbox (38.26585pt too wide) in paragraph at lines 5747--5747
|
||||
Overfull \hbox (38.26585pt too wide) in paragraph at lines 5773--5773
|
||||
[]@texttt set [-abefhkmnptuvxBCEHPT] [-o @textttsl option-name@texttt ] [--] [
|
||||
-] [@textttsl ar-gu-ment []@texttt ][]
|
||||
|
||||
@@ -244,7 +245,7 @@ Overfull \hbox (38.26585pt too wide) in paragraph at lines 5747--5747
|
||||
.etc.
|
||||
|
||||
|
||||
Overfull \hbox (38.26585pt too wide) in paragraph at lines 5748--5748
|
||||
Overfull \hbox (38.26585pt too wide) in paragraph at lines 5774--5774
|
||||
[]@texttt set [+abefhkmnptuvxBCEHPT] [+o @textttsl option-name@texttt ] [--] [
|
||||
-] [@textttsl ar-gu-ment []@texttt ][]
|
||||
|
||||
@@ -264,9 +265,9 @@ Overfull \hbox (38.26585pt too wide) in paragraph at lines 5748--5748
|
||||
texinfo.tex: doing @include of rluser.texi
|
||||
|
||||
|
||||
(/usr/local/src/bash/bash-20241104/lib/readline/doc/rluser.texi Chapter 8
|
||||
(/usr/local/src/bash/bash-20241126/lib/readline/doc/rluser.texi Chapter 8
|
||||
[127] [128] [129] [130] [131] [132] [133] [134] [135] [136] [137] [138]
|
||||
Underfull \hbox (badness 7540) in paragraph at lines 959--965
|
||||
Underfull \hbox (badness 7540) in paragraph at lines 960--966
|
||||
[]@textrm In the ex-am-ple above, @textttsl C-u[] @textrm is bound to the func
|
||||
-tion
|
||||
|
||||
@@ -279,7 +280,7 @@ Underfull \hbox (badness 7540) in paragraph at lines 959--965
|
||||
.etc.
|
||||
|
||||
|
||||
Underfull \hbox (badness 10000) in paragraph at lines 959--965
|
||||
Underfull \hbox (badness 10000) in paragraph at lines 960--966
|
||||
@texttt universal-argument[]@textrm , @textttsl M-DEL[] @textrm is bound to th
|
||||
e func-tion
|
||||
|
||||
@@ -292,7 +293,7 @@ e func-tion
|
||||
.etc.
|
||||
|
||||
[139] [140] [141] [142]
|
||||
Overfull \hbox (26.43913pt too wide) in paragraph at lines 1204--1204
|
||||
Overfull \hbox (26.43913pt too wide) in paragraph at lines 1206--1206
|
||||
[]@texttt Meta-Control-h: backward-kill-word Text after the function name is i
|
||||
gnored[]
|
||||
|
||||
@@ -309,14 +310,14 @@ gnored[]
|
||||
\openout6 = `bashref.fn'.
|
||||
|
||||
[145] [146] [147] [148] [149] [150] [151] [152] [153] [154]
|
||||
[155] [156] [157] [158] [159] [160] [161] [162] [163])
|
||||
[155] [156] [157] [158] [159] [160] [161] [162] [163] [164])
|
||||
texinfo.tex: doing @include of hsuser.texi
|
||||
|
||||
|
||||
(/usr/local/src/bash/bash-20241104/lib/readline/doc/hsuser.texi Chapter 9
|
||||
[164] [165] [166] [167] [168] [169] [170]) Chapter 10 [171] [172] [173]
|
||||
[174] [175]
|
||||
Underfull \hbox (badness 10000) in paragraph at lines 10390--10399
|
||||
(/usr/local/src/bash/bash-20241126/lib/readline/doc/hsuser.texi Chapter 9
|
||||
[165] [166] [167] [168] [169] [170] [171]) Chapter 10 [172] [173] [174]
|
||||
[175] [176]
|
||||
Underfull \hbox (badness 10000) in paragraph at lines 10451--10460
|
||||
[]@textrm All of the fol-low-ing op-tions ex-cept for `@texttt alt-array-implem
|
||||
entation[]@textrm '[],
|
||||
|
||||
@@ -329,7 +330,7 @@ entation[]@textrm '[],
|
||||
.etc.
|
||||
|
||||
|
||||
Underfull \hbox (badness 10000) in paragraph at lines 10390--10399
|
||||
Underfull \hbox (badness 10000) in paragraph at lines 10451--10460
|
||||
@textrm `@texttt disabled-builtins[]@textrm '[], `@texttt direxpand-default[]@t
|
||||
extrm '[], `@texttt strict-posix-default[]@textrm '[], and
|
||||
|
||||
@@ -341,22 +342,22 @@ extrm '[], `@texttt strict-posix-default[]@textrm '[], and
|
||||
.@texttt a
|
||||
.etc.
|
||||
|
||||
[176] [177] [178] [179] Appendix A [180] Appendix B [181] [182] [183] [184]
|
||||
[185] [186] [187] Appendix C [188]
|
||||
[177] [178] [179] [180] Appendix A [181] Appendix B [182] [183] [184] [185]
|
||||
[186] [187] [188] Appendix C [189]
|
||||
texinfo.tex: doing @include of fdl.texi
|
||||
|
||||
|
||||
(/usr/local/src/bash/bash-20241104/doc/fdl.texi [189] [190] [191] [192]
|
||||
[193] [194] [195]) Appendix D [196] [197] [198] [199] [200] [201] [202]
|
||||
[203] [204] [205] )
|
||||
(/usr/local/src/bash/bash-20241126/doc/fdl.texi [190] [191] [192] [193]
|
||||
[194] [195] [196]) Appendix D [197] [198] [199] [200] [201] [202] [203]
|
||||
[204] [205] [206] )
|
||||
Here is how much of TeX's memory you used:
|
||||
4113 strings out of 495840
|
||||
47653 string characters out of 6171739
|
||||
144767 words of memory out of 5000000
|
||||
4114 strings out of 495840
|
||||
47656 string characters out of 6171739
|
||||
145030 words of memory out of 5000000
|
||||
5048 multiletter control sequences out of 15000+600000
|
||||
34315 words of font info for 116 fonts, out of 8000000 for 9000
|
||||
701 hyphenation exceptions out of 8191
|
||||
16i,6n,16p,331b,983s stack positions out of 10000i,1000n,20000p,200000b,200000s
|
||||
16i,6n,16p,389b,983s stack positions out of 10000i,1000n,20000p,200000b,200000s
|
||||
</opt/local/share/texmf-texlive/fonts/type1/public/amsfonts/
|
||||
cm/cmbx12.pfb></opt/local/share/texmf-texlive/fonts/type1/public/amsfonts/cm/cm
|
||||
csc10.pfb></opt/local/share/texmf-texlive/fonts/type1/public/amsfonts/cm/cmmi10
|
||||
@@ -373,10 +374,10 @@ fonts/type1/public/amsfonts/cm/cmti10.pfb></opt/local/share/texmf-texlive/fonts
|
||||
lic/amsfonts/cm/cmtt9.pfb></opt/local/share/texmf-texlive/fonts/type1/public/cm
|
||||
-super/sfrm1095.pfb></opt/local/share/texmf-texlive/fonts/type1/public/cm-super
|
||||
/sfrm1440.pfb>
|
||||
Output written on bashref.pdf (211 pages, 845976 bytes).
|
||||
Output written on bashref.pdf (212 pages, 848660 bytes).
|
||||
PDF statistics:
|
||||
2927 PDF objects out of 2984 (max. 8388607)
|
||||
2668 compressed objects within 27 object streams
|
||||
339 named destinations out of 1000 (max. 500000)
|
||||
2933 PDF objects out of 2984 (max. 8388607)
|
||||
2673 compressed objects within 27 object streams
|
||||
340 named destinations out of 1000 (max. 500000)
|
||||
1157 words of extra memory for PDF output out of 10000 (max. 10000000)
|
||||
|
||||
|
||||
Binary file not shown.
+196
-143
@@ -66,15 +66,17 @@ of @cite{The GNU Bash Reference Manual},
|
||||
for @code{Bash}, Version @value{VERSION}.
|
||||
|
||||
Bash contains features that appear in other popular shells, and some
|
||||
features that only appear in Bash. Some of the shells that Bash has
|
||||
features that only appear in Bash.
|
||||
Some of the shells that Bash has
|
||||
borrowed concepts from are the Bourne Shell (@file{sh}), the Korn Shell
|
||||
(@file{ksh}), and the C-shell (@file{csh} and its successor,
|
||||
@file{tcsh}). The following menu breaks the features up into
|
||||
@file{tcsh}).
|
||||
The following menu breaks the features up into
|
||||
categories, noting which features were inspired by other shells and
|
||||
which are specific to Bash.
|
||||
|
||||
This manual is meant as a brief introduction to features found in
|
||||
Bash. The Bash manual page should be used as the definitive
|
||||
This manual is meant as a brief introduction to features found in Bash.
|
||||
The Bash manual page should be used as the definitive
|
||||
reference on shell behavior.
|
||||
|
||||
@menu
|
||||
@@ -476,7 +478,8 @@ special meaning are left unmodified.
|
||||
|
||||
A double quote may be quoted within double quotes by preceding it with
|
||||
a backslash.
|
||||
If enabled, history expansion will be performed unless an @samp{!}
|
||||
If enabled, history expansion will be performed unless an
|
||||
@samp{!}
|
||||
appearing in double quotes is escaped using a backslash.
|
||||
The backslash preceding the @samp{!} is not removed.
|
||||
|
||||
@@ -553,7 +556,7 @@ been present.
|
||||
|
||||
Prefixing a double-quoted string with a dollar sign (@samp{$}), such
|
||||
as @verb{|$"hello, world"|},
|
||||
will cause the string to be translated according to the current locale.
|
||||
causes the string to be translated according to the current locale.
|
||||
The @code{gettext} infrastructure performs the lookup and
|
||||
translation, using the @code{LC_MESSAGES}, @code{TEXTDOMAINDIR},
|
||||
and @code{TEXTDOMAIN} shell variables, as explained below.
|
||||
@@ -1223,7 +1226,7 @@ instead of as a regular expression (see above).
|
||||
If the pattern is stored in a shell variable, quoting the variable
|
||||
expansion forces the entire pattern to be matched literally.
|
||||
|
||||
The pattern will match if it matches any part of the string.
|
||||
The match succeeds if the pattern matches any part of the string.
|
||||
If you want to force the pattern to match the entire string,
|
||||
anchor the pattern using the @samp{^} and @samp{$} regular expression
|
||||
operators.
|
||||
@@ -1679,7 +1682,7 @@ returns.
|
||||
|
||||
For example, if a variable @env{var} is declared as local in function
|
||||
@code{func1}, and @code{func1} calls another function @code{func2},
|
||||
references to @env{var} made from within @code{func2} will resolve to the
|
||||
references to @env{var} made from within @code{func2} resolve to the
|
||||
local variable @env{var} from @code{func1}, shadowing any global variable
|
||||
named @env{var}.
|
||||
|
||||
@@ -1706,24 +1709,24 @@ var=global
|
||||
func1
|
||||
@end example
|
||||
|
||||
The @code{unset} builtin also acts using the same dynamic scope: if a
|
||||
variable is local to the current scope, @code{unset} will unset it;
|
||||
otherwise the unset will refer to the variable found in any calling scope
|
||||
The @code{unset} builtin also acts using the same dynamic scope: if a
|
||||
variable is local to the current scope, @code{unset} unsets it;
|
||||
otherwise the unset will refer to the variable found in any calling scope
|
||||
as described above.
|
||||
If a variable at the current local scope is unset, it will remain so
|
||||
If a variable at the current local scope is unset, it remains so
|
||||
(appearing as unset)
|
||||
until it is reset in that scope or until the function returns.
|
||||
Once the function returns, any instance of the variable at a previous
|
||||
scope will become visible.
|
||||
If the unset acts on a variable at a previous scope, any instance of a
|
||||
scope becomes visible.
|
||||
If the unset acts on a variable at a previous scope, any instance of a
|
||||
variable with that name that had been shadowed will become visible
|
||||
(see below how @code{localvar_unset} shell option changes this behavior).
|
||||
(see below how the @code{localvar_unset} shell option changes this behavior).
|
||||
|
||||
The @option{-f} option to the @code{declare} (@code{typeset})
|
||||
builtin command (@pxref{Bash Builtins})
|
||||
will list function names and definitions.
|
||||
lists function names and definitions.
|
||||
The @option{-F} option to @code{declare} or @code{typeset}
|
||||
will list the function names only
|
||||
lists the function names only
|
||||
(and optionally the source file and line number, if the @code{extdebug}
|
||||
shell option is enabled).
|
||||
Functions may be exported so that child shell processes
|
||||
@@ -1734,7 +1737,7 @@ automatically have them defined with the
|
||||
The @option{-f} option to
|
||||
the @code{unset} builtin
|
||||
(@pxref{Bourne Shell Builtins})
|
||||
will delete a function definition.
|
||||
deletes a function definition.
|
||||
|
||||
Functions may be recursive.
|
||||
The @code{FUNCNEST} variable may be used to limit the depth of the
|
||||
@@ -1793,12 +1796,13 @@ command export var=value
|
||||
@end example
|
||||
|
||||
In the context where an assignment statement is assigning a value
|
||||
to a shell variable or array index (@pxref{Arrays}), the @samp{+=}
|
||||
operator will append to or add to the variable's previous value.
|
||||
This includes arguments to declaration commands such as @code{declare}
|
||||
that accept assignment statements.
|
||||
When @samp{+=} is applied to a variable for which the @code{integer} attribute
|
||||
has been set,
|
||||
to a shell variable or array index (@pxref{Arrays}),
|
||||
the @samp{+=} operator appends to or adds to
|
||||
the variable's previous value.
|
||||
This includes arguments to declaration commands such as
|
||||
@code{declare} that accept assignment statements.
|
||||
When @samp{+=} is applied to a variable
|
||||
for which the @code{integer} attribute has been set,
|
||||
the variable's current value and @var{value} are each evaluated as
|
||||
arithmetic expressions,
|
||||
and the sum of the results is assigned as the variable's value.
|
||||
@@ -1838,7 +1842,7 @@ to the variable whose name was passed as @code{$1}.
|
||||
|
||||
If the control variable in a @code{for} loop has the nameref attribute,
|
||||
the list of words can be a list of shell variables, and a name reference
|
||||
will be established for each word in the list, in turn, when the loop is
|
||||
is established for each word in the list, in turn, when the loop is
|
||||
executed.
|
||||
Array variables cannot be given the nameref attribute.
|
||||
However, nameref variables can reference array variables and subscripted
|
||||
@@ -1846,7 +1850,7 @@ array variables.
|
||||
Namerefs can be unset using the @option{-n} option to the @code{unset} builtin
|
||||
(@pxref{Bourne Shell Builtins}).
|
||||
Otherwise, if @code{unset} is executed with the name of a nameref variable
|
||||
as an argument, the variable referenced by the nameref variable will be unset.
|
||||
as an argument, the variable referenced by the nameref variable is unset.
|
||||
|
||||
@node Positional Parameters
|
||||
@subsection Positional Parameters
|
||||
@@ -2058,8 +2062,8 @@ where @var{x} and @var{y} are either integers or letters,
|
||||
and @var{incr}, an optional increment, is an integer.
|
||||
When integers are supplied, the expression expands to each number between
|
||||
@var{x} and @var{y}, inclusive.
|
||||
When either @var{x} or @var{y} begins with a zero, the shell
|
||||
attempts to force all generated terms to contain the same number of digits,
|
||||
If either @var{x} or @var{y} begins with a zero,
|
||||
each generated term will contain the same number of digits,
|
||||
zero-padding where necessary.
|
||||
When letters are supplied, the expression expands to each character
|
||||
lexicographically between @var{x} and @var{y}, inclusive,
|
||||
@@ -2568,7 +2572,7 @@ This is intended to duplicate a common @code{sed} idiom.
|
||||
Quoting any part of @var{string} inhibits replacement in the
|
||||
expansion of the quoted portion, including replacement strings stored
|
||||
in shell variables.
|
||||
Backslash will escape @samp{&} in @var{string}; the backslash is removed
|
||||
Backslash escapes @samp{&} in @var{string}; the backslash is removed
|
||||
in order to permit a literal @samp{&} in the replacement string.
|
||||
Users should take care if @var{string} is double-quoted to avoid
|
||||
unwanted interactions between the backslash and double-quoting, since
|
||||
@@ -2696,7 +2700,7 @@ The expansion is a string that is the result of expanding the value of
|
||||
@item A
|
||||
The expansion is a string in the form of
|
||||
an assignment statement or @code{declare} command that, if
|
||||
evaluated, will recreate @var{parameter} with its attributes and value.
|
||||
evaluated, recreates @var{parameter} with its attributes and value.
|
||||
@item K
|
||||
Produces a possibly-quoted version of the value of @var{parameter},
|
||||
except that it prints the values of
|
||||
@@ -2778,7 +2782,7 @@ word would usually require.
|
||||
Any side effects of @var{command} take effect immediately
|
||||
in the current execution environment and persist in the current
|
||||
environment after the command completes (e.g., the @code{exit} builtin
|
||||
will exit the shell).
|
||||
exits the shell).
|
||||
|
||||
This type of command substitution superficially resembles executing an
|
||||
unnamed shell function: local variables are created as when a shell
|
||||
@@ -2877,10 +2881,10 @@ passed as an argument to the current command as the result of the
|
||||
expansion.
|
||||
|
||||
If the @code{>(@var{list})} form is used, writing to
|
||||
the file will provide input for @var{list}.
|
||||
the file provides input for @var{list}.
|
||||
If the
|
||||
@code{<(@var{list})} form is used, reading the file
|
||||
will obtain the output of @var{list}.
|
||||
obtains the output of @var{list}.
|
||||
Note that no space may appear between the @code{<} or @code{>}
|
||||
and the left parenthesis, otherwise the construct would be interpreted
|
||||
as a redirection.
|
||||
@@ -2936,7 +2940,7 @@ Explicit null arguments (@code{""} or @code{''}) are retained
|
||||
and passed to commands as empty strings.
|
||||
Unquoted implicit null arguments, resulting from the expansion of
|
||||
parameters that have no values, are removed.
|
||||
Expanding a parameter with no value within double quotes
|
||||
Expanding a parameter with no value within double quotes
|
||||
produces a null field,
|
||||
which is retained and passed to a command as an empty string.
|
||||
|
||||
@@ -3013,7 +3017,8 @@ is set and not null.
|
||||
However, setting @env{GLOBIGNORE} to a non-null value has the effect of
|
||||
enabling the @code{dotglob}
|
||||
shell option, so all other filenames beginning with a
|
||||
@samp{.} will match.
|
||||
@samp{.}
|
||||
match.
|
||||
To get the old behavior of ignoring filenames beginning with a
|
||||
@samp{.}, make @samp{.*} one of the patterns in @env{GLOBIGNORE}.
|
||||
The @code{dotglob} option is disabled when @env{GLOBIGNORE}
|
||||
@@ -3046,9 +3051,9 @@ The special pattern characters have the following meanings:
|
||||
Matches any string, including the null string.
|
||||
When the @code{globstar} shell option is enabled, and @samp{*} is used in
|
||||
a filename expansion context, two adjacent @samp{*}s used as a single
|
||||
pattern will match all files and zero or more directories and
|
||||
pattern match all files and zero or more directories and
|
||||
subdirectories.
|
||||
If followed by a @samp{/}, two adjacent @samp{*}s will match only
|
||||
If followed by a @samp{/}, two adjacent @samp{*}s match only
|
||||
directories and subdirectories.
|
||||
@item ?
|
||||
Matches any single character.
|
||||
@@ -3178,8 +3183,8 @@ result from one of the above expansions are removed.
|
||||
@section Redirections
|
||||
@cindex redirection
|
||||
|
||||
Before a command is executed, its input and output
|
||||
may be @dfn{redirected}
|
||||
Before a command is executed, its input and output may be
|
||||
@dfn{redirected}
|
||||
using a special notation interpreted by the shell.
|
||||
@dfn{Redirection} allows commands' file handles to be
|
||||
duplicated, opened, closed, made to refer to different files,
|
||||
@@ -3195,25 +3200,30 @@ left to right.
|
||||
Each redirection that may be preceded by a file descriptor number
|
||||
may instead be preceded by a word of the form @{@var{varname}@}.
|
||||
In this case, for each redirection operator except
|
||||
>&- and <&-, the shell will allocate a file descriptor greater
|
||||
than 10 and assign it to @{@var{varname}@}.
|
||||
If @{@var{varname}@} precedes >&- or <&-,
|
||||
the value of @var{varname} defines the file
|
||||
descriptor to close.
|
||||
@code{>&-}
|
||||
and
|
||||
@code{<&-},
|
||||
the shell allocates a file descriptor greater
|
||||
than or equal to 10 and assigns it to @{@var{varname}@}.
|
||||
If @{@var{varname}@} precedes
|
||||
@code{>&-}
|
||||
or
|
||||
@code{<&-},
|
||||
the value of @var{varname} defines the file descriptor to close.
|
||||
If @{@var{varname}@} is supplied, the redirection persists beyond
|
||||
the scope of the command, which allows the shell programmer to manage
|
||||
the file descriptor's lifetime manually without using
|
||||
the scope of the command, which allows the shell programmer to
|
||||
manage the file descriptor's lifetime manually without using
|
||||
the @code{exec} builtin.
|
||||
The @code{varredir_close} shell option manages this behavior
|
||||
(@pxref{The Shopt Builtin}).
|
||||
|
||||
In the following descriptions, if the file descriptor number is
|
||||
omitted, and the first character of the redirection operator is
|
||||
@samp{<}, the redirection refers to the standard input (file
|
||||
descriptor 0).
|
||||
If the first character of the redirection operator
|
||||
is @samp{>}, the redirection refers to the standard output (file
|
||||
descriptor 1).
|
||||
@samp{<},
|
||||
the redirection refers to the standard input (file descriptor 0).
|
||||
If the first character of the redirection operator is
|
||||
@samp{>},
|
||||
the redirection refers to the standard output (file descriptor 1).
|
||||
|
||||
The @var{word} following the redirection operator in the following
|
||||
descriptions, unless otherwise noted, is subjected to
|
||||
@@ -3247,7 +3257,7 @@ before the standard output was redirected to @var{dirlist}.
|
||||
Bash handles several filenames specially when they are used in
|
||||
redirections, as described in the following table.
|
||||
If the operating system on which Bash is running provides these
|
||||
special files, Bash will use them; otherwise it will emulate them
|
||||
special files, Bash uses them; otherwise it emulates them
|
||||
internally with the behavior described below.
|
||||
|
||||
@table @code
|
||||
@@ -3305,10 +3315,15 @@ The general format for redirecting output is:
|
||||
[@var{n}]>[|]@var{word}
|
||||
@end example
|
||||
|
||||
If the redirection operator is @samp{>}, and the @code{noclobber}
|
||||
option to the @code{set} builtin has been enabled, the redirection
|
||||
will fail if the file whose name results from the expansion of
|
||||
@var{word} exists and is a regular file.
|
||||
If the redirection operator is
|
||||
@samp{>},
|
||||
and the
|
||||
@code{noclobber}
|
||||
option to the
|
||||
@code{set}
|
||||
builtin has been enabled, the redirection fails if the file
|
||||
whose name results from the expansion of @var{word} exists and is
|
||||
a regular file.
|
||||
If the redirection operator is @samp{>|}, or the redirection operator is
|
||||
@samp{>} and the @code{noclobber} option is not enabled,
|
||||
Bash attemps the redirection
|
||||
@@ -4154,7 +4169,7 @@ If it is not a valid directory name, @code{cd} returns a non-zero status.
|
||||
|
||||
If the @option{-e} option is supplied with @option{-P}
|
||||
and @code{cd} cannot successfully determine the current working directory
|
||||
after a successful directory change, it will return a non-zero status.
|
||||
after a successful directory change, it returns a non-zero status.
|
||||
|
||||
On systems that support it, the @option{-@@} option presents the extended
|
||||
attributes associated with a file as a directory.
|
||||
@@ -4321,8 +4336,8 @@ error reporting.
|
||||
In normal operation, @code{getopts} prints diagnostic messages
|
||||
when it encounters invalid options or missing option arguments.
|
||||
If the variable @env{OPTERR}
|
||||
is set to 0, no error messages will be displayed, even if the first
|
||||
character of @code{optstring} is not a colon.
|
||||
is set to 0, @code{getopts} does not display any error messages,
|
||||
even if the first character of @code{optstring} is not a colon.
|
||||
|
||||
If @code{getopts} detects an invalid option, it
|
||||
places @samp{?} into @var{name} and, if not silent,
|
||||
@@ -6686,9 +6701,11 @@ Assignments to @env{BASH_ARGV} have no effect, and it may not be unset.
|
||||
When referenced, this variable expands to the name of the shell or shell
|
||||
script (identical to @code{$0}; @xref{Special Parameters},
|
||||
for the description of special parameter 0).
|
||||
Assigning a value to @code{BASH_ARGV0}
|
||||
assigns the same value to @code{$0}.
|
||||
If @env{BASH_ARGV0}
|
||||
Assigning a value to
|
||||
@code{BASH_ARGV0}
|
||||
sets @code{$0} to the same value.
|
||||
If
|
||||
@env{BASH_ARGV0}
|
||||
is unset, it loses its special properties, even if it is
|
||||
subsequently reset.
|
||||
|
||||
@@ -6824,17 +6841,23 @@ Expands to a string describing the version of this instance of
|
||||
Bash (e.g., 5.2.37(3)-release).
|
||||
|
||||
@item BASH_XTRACEFD
|
||||
If set to an integer corresponding to a valid file descriptor, Bash
|
||||
will write the trace output generated when @samp{set -x}
|
||||
is enabled to that file descriptor
|
||||
If set to an integer corresponding to a valid file descriptor,
|
||||
Bash writes the trace output generated when
|
||||
@samp{set -x}
|
||||
is enabled to that file descriptor,
|
||||
instead of the standard error.
|
||||
This allows tracing output to be separated from diagnostic and error
|
||||
messages.
|
||||
The file descriptor is closed when @code{BASH_XTRACEFD} is unset or assigned
|
||||
a new value.
|
||||
Unsetting @code{BASH_XTRACEFD} or assigning it the empty string causes the
|
||||
The file descriptor is closed when
|
||||
@code{BASH_XTRACEFD}
|
||||
is unset or assigned a new value.
|
||||
Unsetting
|
||||
@code{BASH_XTRACEFD}
|
||||
or assigning it the empty string causes the
|
||||
trace output to be sent to the standard error.
|
||||
Note that setting @code{BASH_XTRACEFD} to 2 (the standard error file
|
||||
Note that setting
|
||||
@code{BASH_XTRACEFD}
|
||||
to 2 (the standard error file
|
||||
descriptor) and then unsetting it will result in the standard error
|
||||
being closed.
|
||||
|
||||
@@ -6925,7 +6948,7 @@ Directories appear in the stack in the order they are displayed by the
|
||||
Assigning to members of this array variable may be used to modify
|
||||
directories already in the stack, but the @code{pushd} and @code{popd}
|
||||
builtins must be used to add and remove directories.
|
||||
Assignment to this variable will not change the current directory.
|
||||
Assigning to this variable does not change the current directory.
|
||||
If @env{DIRSTACK}
|
||||
is unset, it loses its special properties, even if
|
||||
it is subsequently reset.
|
||||
@@ -7006,15 +7029,19 @@ it is subsequently reset.
|
||||
This variable can be used with @code{BASH_LINENO} and @code{BASH_SOURCE}.
|
||||
Each element of @code{FUNCNAME} has corresponding elements in
|
||||
@code{BASH_LINENO} and @code{BASH_SOURCE} to describe the call stack.
|
||||
For instance, @code{$@{FUNCNAME[$i]@}} was called from the file
|
||||
@code{$@{BASH_SOURCE[$i+1]@}} at line number @code{$@{BASH_LINENO[$i]@}}.
|
||||
For instance,
|
||||
@code{$@{FUNCNAME[$i]@}}
|
||||
was called from the file
|
||||
@code{$@{BASH_SOURCE[$i+1]@}}
|
||||
at line number
|
||||
@code{$@{BASH_LINENO[$i]@}}.
|
||||
The @code{caller} builtin displays the current call stack using this
|
||||
information.
|
||||
|
||||
@item FUNCNEST
|
||||
A numeric value greater than 0 defines a maximum function nesting level.
|
||||
Function invocations that exceed this nesting level
|
||||
will cause the current command to abort.
|
||||
cause the current command to abort.
|
||||
|
||||
@item GLOBIGNORE
|
||||
A colon-separated list of patterns defining the set of file names to
|
||||
@@ -7058,7 +7085,7 @@ order by modification time (newest first).
|
||||
|
||||
The @samp{numeric} specifier treats names consisting solely of digits as
|
||||
numbers and sorts them using their numeric value
|
||||
(so "2" will sort before "10", for example).
|
||||
(so ``2'' sorts before ``10'', for example).
|
||||
When using @samp{numeric}, names containing non-digits sort after all
|
||||
the all-digit names and are sorted by name using the traditional behavior.
|
||||
|
||||
@@ -7082,27 +7109,30 @@ is unset, it loses its special properties, even if it is
|
||||
subsequently reset.
|
||||
|
||||
@item histchars
|
||||
Up to three characters which control history expansion, quick
|
||||
substitution, and tokenization (@pxref{History Interaction}).
|
||||
The first character is the
|
||||
@dfn{history expansion} character,
|
||||
the character which begins a history expansion, normally @samp{!}.
|
||||
The second character is the
|
||||
character which signifies "quick substitution" when seen as the first
|
||||
character on a line, normally @samp{^}.
|
||||
The optional third character is the
|
||||
character which indicates that the remainder of the line is a comment when
|
||||
found as the first character of a word, usually @samp{#}.
|
||||
The history
|
||||
comment character disables history substitution for the
|
||||
remaining words on the line.
|
||||
It does not necessarily cause the shell
|
||||
parser to treat the rest of the line as a comment.
|
||||
The two or three characters which control history expansion,
|
||||
quick substitution, and tokenization
|
||||
(@pxref{History Interaction}).
|
||||
The first character is the @dfn{history expansion} character,
|
||||
the character which begins a history expansion, normally
|
||||
@samp{!}.
|
||||
The second character is the ``quick substitution'' character, normally
|
||||
@samp{^}.
|
||||
When it appears as the first character on the line,
|
||||
history substitution repeats the previous command,
|
||||
replacing one string with another.
|
||||
The optional third character is the character which indicates that
|
||||
the remainder of the line is a comment when found as the first character
|
||||
of a word, usually @samp{#}.
|
||||
The history comment character disables history substitution
|
||||
for the remaining words on the line.
|
||||
It does not necessarily cause the shell parser to treat the rest of the
|
||||
line as a comment.
|
||||
|
||||
@item HISTCMD
|
||||
The history number, or index in the history list, of the current
|
||||
command.
|
||||
Assignments to @env{HISTCMD} are ignored.
|
||||
Assignments to @env{HISTCMD}
|
||||
have no effect.
|
||||
If @env{HISTCMD}
|
||||
is unset, it loses its special properties,
|
||||
even if it is subsequently reset.
|
||||
@@ -7120,14 +7150,15 @@ A value of @samp{erasedups} causes all previous lines matching the
|
||||
current line to be removed from the history list before that line
|
||||
is saved.
|
||||
Any value not in the above list is ignored.
|
||||
If @env{HISTCONTROL} is unset, or does not include a valid value,
|
||||
all lines read by the shell parser are saved on the history list,
|
||||
If @env{HISTCONTROL} is unset, or does not include a valid value,
|
||||
Bash saves all lines read by the shell parser on the history list,
|
||||
subject to the value of @env{HISTIGNORE}.
|
||||
The second and subsequent lines of a multi-line compound command are
|
||||
not tested, and are added to the history regardless of the value of
|
||||
@env{HISTCONTROL} if the first line of the command was saved.
|
||||
If the first line of a multi-line compound command was saved,
|
||||
the second and subsequent lines are not tested,
|
||||
and are added to the history regardless of the value of
|
||||
@env{HISTCONTROL}.
|
||||
If the first line was not saved, the second and subsequent lines of
|
||||
the command are not saved, either.
|
||||
the command are not saved either.
|
||||
|
||||
@item HISTFILE
|
||||
The name of the file to which the command history is saved.
|
||||
@@ -7151,22 +7182,28 @@ after reading any startup files.
|
||||
A colon-separated list of patterns used to decide which command
|
||||
lines should be saved on the history list.
|
||||
If a command line matches one of the patterns in the value of
|
||||
@code{HISTIGNORE}, it is not saved on the history list.
|
||||
Each pattern is
|
||||
anchored at the beginning of the line and must match the complete
|
||||
line (Bash will not implicitly append a @samp{*}).
|
||||
Each pattern is tested
|
||||
against the line after the checks specified by @env{HISTCONTROL}
|
||||
@code{HISTIGNORE},
|
||||
it is not saved on the history list.
|
||||
Each pattern is anchored at the
|
||||
beginning of the line and must match the complete line
|
||||
(Bash does not implicitly append a
|
||||
@samp{*}).
|
||||
Each pattern is tested against the line
|
||||
after the checks specified by
|
||||
@env{HISTCONTROL}
|
||||
are applied.
|
||||
In addition to the normal shell pattern matching characters, @samp{&}
|
||||
In addition to the normal shell pattern matching characters,
|
||||
@samp{&}
|
||||
matches the previous history line.
|
||||
@samp{&} may be escaped using a backslash; the backslash is removed
|
||||
before attempting a match.
|
||||
The second and subsequent lines of a multi-line compound command are
|
||||
not tested, and are added to the history regardless of the value of
|
||||
@env{HISTIGNORE}, if the first line was saved.
|
||||
A backslash escapes the
|
||||
@samp{&};
|
||||
the backslash is removed before attempting a match.
|
||||
If the first line of a multi-line compound command was saved,
|
||||
the second and subsequent lines are not tested,
|
||||
and are added to the history regardless of the value of
|
||||
@env{HISTIGNORE}.
|
||||
If the first line was not saved, the second and subsequent lines of
|
||||
the command are not saved, either.
|
||||
the command are not saved either.
|
||||
The pattern matching honors the setting of the @code{extglob} shell
|
||||
option.
|
||||
|
||||
@@ -7200,10 +7237,13 @@ is running;
|
||||
the next time hostname completion is attempted after the
|
||||
value is changed, Bash adds the contents of the new file to the
|
||||
existing list.
|
||||
If @env{HOSTFILE} is set, but has no value, or does not name a readable file,
|
||||
If @env{HOSTFILE}
|
||||
is set, but has no value, or does not name a readable file,
|
||||
Bash attempts to read
|
||||
@file{/etc/hosts} to obtain the list of possible hostname completions.
|
||||
When @env{HOSTFILE} is unset, the hostname list is cleared.
|
||||
@file{/etc/hosts}
|
||||
to obtain the list of possible hostname completions.
|
||||
When @env{HOSTFILE} is unset,
|
||||
Bash clears the hostname list.
|
||||
|
||||
@item HOSTNAME
|
||||
The name of the current host.
|
||||
@@ -7368,10 +7408,12 @@ The current working directory as set by the @code{cd} builtin.
|
||||
|
||||
@item RANDOM
|
||||
Each time this parameter is referenced, it expands to a random integer
|
||||
between 0 and 32767. Assigning a value to this
|
||||
variable initializes (seeds) the random number generator.
|
||||
Seeding the random number generator with the same constant value will
|
||||
produce the same sequence of values.
|
||||
between 0 and 32767.
|
||||
Assigning a value to
|
||||
@env{RANDOM}
|
||||
initializes (seeds) the sequence of random numbers.
|
||||
Seeding the random number generator with the same constant value
|
||||
produces the same sequence of values.
|
||||
If @env{RANDOM}
|
||||
is unset, it loses its special properties, even if it is
|
||||
subsequently reset.
|
||||
@@ -7475,7 +7517,7 @@ The CPU percentage, computed as (%U + %S) / %R.
|
||||
The optional @var{p} is a digit specifying the precision, the number of
|
||||
fractional digits after a decimal point.
|
||||
A value of 0 causes no decimal point or fraction to be output.
|
||||
@code{time} will print at most six digits after the decimal point;
|
||||
@code{time} prints at most six digits after the decimal point;
|
||||
values of @var{p} greater than 6 are changed to 6.
|
||||
If @var{p} is not specified,
|
||||
@code{time} prints three digits after the decimal point.
|
||||
@@ -7731,8 +7773,9 @@ executes commands from the file @file{/etc/profile}, if that file exists.
|
||||
After reading that file, it looks for @file{~/.bash_profile},
|
||||
@file{~/.bash_login}, and @file{~/.profile}, in that order, and reads
|
||||
and executes commands from the first one that exists and is readable.
|
||||
The @option{--noprofile} option may be used when the shell is started to
|
||||
inhibit this behavior.
|
||||
The
|
||||
@option{--noprofile}
|
||||
option inhibits this behavior.
|
||||
|
||||
When an interactive login shell exits,
|
||||
or a non-interactive login shell executes the @code{exit} builtin command,
|
||||
@@ -7743,7 +7786,7 @@ the file @file{~/.bash_logout}, if it exists.
|
||||
|
||||
When Bash runs as an interactive shell that is not a login shell, it
|
||||
reads and executes commands from @file{~/.bashrc}, if that file exists.
|
||||
This may be inhibited by using the @option{--norc} option.
|
||||
The @option{--norc} option inhibits this behavior.
|
||||
The @option{--rcfile @var{file}} option
|
||||
causes Bash to
|
||||
use @var{file} instead of @file{~/.bashrc}.
|
||||
@@ -7783,7 +7826,7 @@ When invoked as an interactive login shell, or as a non-interactive
|
||||
shell with the @option{--login} option, it first attempts to read
|
||||
and execute commands from @file{/etc/profile} and @file{~/.profile}, in
|
||||
that order.
|
||||
The @option{--noprofile} option will inhibit this behavior.
|
||||
The @option{--noprofile} option inhibits this behavior.
|
||||
|
||||
When invoked as an interactive shell with the name @code{sh}, Bash
|
||||
looks for the variable @env{ENV}, expands its value if it is defined,
|
||||
@@ -7818,11 +7861,14 @@ If Bash
|
||||
determines it is being run non-interactively in this fashion,
|
||||
it reads and executes commands from @file{~/.bashrc}, if that
|
||||
file exists and is readable.
|
||||
It will not do this if invoked as @code{sh}.
|
||||
The @option{--norc} option will inhibit this behavior, and the
|
||||
@option{--rcfile} option
|
||||
will make Bash use a different file instead of
|
||||
@file{~/.bashrc}, but neither
|
||||
Bash does not read this file if invoked as @code{sh}.
|
||||
The
|
||||
@option{--norc}
|
||||
option inhibits this behavior, and the
|
||||
@option{--rcfile}
|
||||
option makes Bash use a different file instead of
|
||||
@file{~/.bashrc},
|
||||
but neither
|
||||
@code{rshd} nor @code{sshd} generally invoke the shell with those
|
||||
options or allow them to be specified.
|
||||
|
||||
@@ -8027,7 +8073,7 @@ comparisons.
|
||||
Bash handles several filenames specially when they are used in
|
||||
expressions.
|
||||
If the operating system on which Bash is running provides these
|
||||
special files, Bash will use them; otherwise it will emulate them
|
||||
special files, Bash uses them; otherwise it emulates them
|
||||
internally with this behavior:
|
||||
If the @var{file} argument to one of the primaries is of the form
|
||||
@file{/dev/fd/@var{N}}, then Bash checks file descriptor @var{N}.
|
||||
@@ -8368,20 +8414,22 @@ function is executed. To be safe, always put
|
||||
alias definitions on a separate line, and do not use @code{alias}
|
||||
in compound commands.
|
||||
|
||||
For almost every purpose, shell functions are preferred over aliases.
|
||||
For almost every purpose, shell functions are preferable to aliases.
|
||||
|
||||
@node Arrays
|
||||
@section Arrays
|
||||
@cindex arrays
|
||||
|
||||
Bash provides one-dimensional indexed and associative array variables.
|
||||
Any variable may be used as an indexed array;
|
||||
the @code{declare} builtin will explicitly declare an array.
|
||||
Bash
|
||||
provides one-dimensional indexed and associative array variables.
|
||||
Any variable may be used as an indexed array; the
|
||||
@code{declare}
|
||||
builtin explicitly declares an array.
|
||||
There is no maximum
|
||||
limit on the size of an array, nor any requirement that members
|
||||
be indexed or assigned contiguously.
|
||||
Indexed arrays are referenced using integers (including arithmetic
|
||||
expressions (@pxref{Shell Arithmetic})) and are zero-based;
|
||||
Indexed arrays are referenced using arithmetic expressions
|
||||
that must expand to an integer (@pxref{Shell Arithmetic})) and are zero-based;
|
||||
associative arrays use arbitrary strings.
|
||||
Unless otherwise noted, indexed array indices must be non-negative integers.
|
||||
|
||||
@@ -8400,6 +8448,7 @@ To explicitly declare an array, use
|
||||
declare -a @var{name}
|
||||
@end example
|
||||
@noindent
|
||||
(@pxref{Bash Builtins}).
|
||||
The syntax
|
||||
@example
|
||||
declare -a @var{name}[@var{subscript}]
|
||||
@@ -8463,7 +8512,7 @@ interpreted as relative to one greater than the maximum index of
|
||||
@var{name}, so negative indices count back from the end of the
|
||||
array, and an index of -1 references the last element.
|
||||
|
||||
The @samp{+=} operator will append to an array variable when assigning
|
||||
The @samp{+=} operator appends to an array variable when assigning
|
||||
using the compound assignment syntax; see @ref{Shell Parameters} above.
|
||||
|
||||
An array element is referenced using
|
||||
@@ -8505,8 +8554,8 @@ and an index of -1 refers to the last element.
|
||||
|
||||
Referencing an array variable without a subscript is equivalent to
|
||||
referencing with a subscript of 0.
|
||||
Any reference to a variable using a valid subscript is valid, and
|
||||
Bash will create an array if necessary.
|
||||
Any reference to a variable using a valid subscript is valid;
|
||||
Bash creates an array if necessary.
|
||||
|
||||
An array variable is considered set if a subscript has been assigned a
|
||||
value.
|
||||
@@ -8768,7 +8817,8 @@ The character whose ASCII code is the octal value @var{nnn}.
|
||||
@item \\
|
||||
A backslash.
|
||||
@item \[
|
||||
Begin a sequence of non-printing characters. This could be used to
|
||||
Begin a sequence of non-printing characters.
|
||||
Thiss could be used to
|
||||
embed a terminal control sequence into the prompt.
|
||||
@item \]
|
||||
End a sequence of non-printing characters.
|
||||
@@ -11158,7 +11208,8 @@ More features unique to Bash may be found in @ref{Bash Features}.
|
||||
@appendixsec Implementation Differences From The SVR4.2 Shell
|
||||
|
||||
Since Bash is a completely new implementation, it does not suffer from
|
||||
many of the limitations of the SVR4.2 shell. For instance:
|
||||
many of the limitations of the SVR4.2 shell.
|
||||
For instance:
|
||||
|
||||
@itemize @bullet
|
||||
|
||||
@@ -11168,13 +11219,15 @@ a shell control structure such as an @code{if} or @code{while}
|
||||
statement.
|
||||
|
||||
@item
|
||||
Bash does not allow unbalanced quotes. The SVR4.2 shell will silently
|
||||
Bash does not allow unbalanced quotes.
|
||||
The SVR4.2 shell will silently
|
||||
insert a needed closing quote at @code{EOF} under certain circumstances.
|
||||
This can be the cause of some hard-to-find errors.
|
||||
|
||||
@item
|
||||
The SVR4.2 shell uses a baroque memory management scheme based on
|
||||
trapping @code{SIGSEGV}. If the shell is started from a process with
|
||||
trapping @code{SIGSEGV}.
|
||||
If the shell is started from a process with
|
||||
@code{SIGSEGV} blocked (e.g., by using the @code{system()} C library
|
||||
function call), it misbehaves badly.
|
||||
|
||||
@@ -11199,8 +11252,8 @@ The SVR4.2 shell treats @samp{^} as the undocumented equivalent of
|
||||
|
||||
@item
|
||||
Bash allows multiple option arguments when it is invoked (@code{-x -v});
|
||||
the SVR4.2 shell allows only one option argument (@code{-xv}). In
|
||||
fact, some versions of the shell dump core if the second argument begins
|
||||
the SVR4.2 shell allows only one option argument (@code{-xv}).
|
||||
In fact, some versions of the shell dump core if the second argument begins
|
||||
with a @samp{-}.
|
||||
|
||||
@item
|
||||
|
||||
+31
-31
@@ -40,14 +40,14 @@
|
||||
@numsubsecentry{Quote Removal}{3.5.9}{Quote Removal}{40}
|
||||
@numsecentry{Redirections}{3.6}{Redirections}{40}
|
||||
@numsubsecentry{Redirecting Input}{3.6.1}{}{41}
|
||||
@numsubsecentry{Redirecting Output}{3.6.2}{}{41}
|
||||
@numsubsecentry{Redirecting Output}{3.6.2}{}{42}
|
||||
@numsubsecentry{Appending Redirected Output}{3.6.3}{}{42}
|
||||
@numsubsecentry{Redirecting Standard Output and Standard Error}{3.6.4}{}{42}
|
||||
@numsubsecentry{Appending Standard Output and Standard Error}{3.6.5}{}{42}
|
||||
@numsubsecentry{Here Documents}{3.6.6}{}{42}
|
||||
@numsubsecentry{Here Documents}{3.6.6}{}{43}
|
||||
@numsubsecentry{Here Strings}{3.6.7}{}{43}
|
||||
@numsubsecentry{Duplicating File Descriptors}{3.6.8}{}{43}
|
||||
@numsubsecentry{Moving File Descriptors}{3.6.9}{}{43}
|
||||
@numsubsecentry{Moving File Descriptors}{3.6.9}{}{44}
|
||||
@numsubsecentry{Opening File Descriptors for Reading and Writing}{3.6.10}{}{44}
|
||||
@numsecentry{Executing Commands}{3.7}{Executing Commands}{44}
|
||||
@numsubsecentry{Simple Command Expansion}{3.7.1}{Simple Command Expansion}{44}
|
||||
@@ -113,31 +113,31 @@
|
||||
@numsubsecentry{Some Miscellaneous Commands}{8.4.8}{Miscellaneous Commands}{153}
|
||||
@numsecentry{Readline vi Mode}{8.5}{Readline vi Mode}{156}
|
||||
@numsecentry{Programmable Completion}{8.6}{Programmable Completion}{156}
|
||||
@numsecentry{Programmable Completion Builtins}{8.7}{Programmable Completion Builtins}{158}
|
||||
@numsecentry{A Programmable Completion Example}{8.8}{A Programmable Completion Example}{162}
|
||||
@numchapentry{Using History Interactively}{9}{Using History Interactively}{165}
|
||||
@numsecentry{Bash History Facilities}{9.1}{Bash History Facilities}{165}
|
||||
@numsecentry{Bash History Builtins}{9.2}{Bash History Builtins}{166}
|
||||
@numsecentry{History Expansion}{9.3}{History Interaction}{168}
|
||||
@numsubsecentry{Event Designators}{9.3.1}{Event Designators}{169}
|
||||
@numsubsecentry{Word Designators}{9.3.2}{Word Designators}{170}
|
||||
@numsubsecentry{Modifiers}{9.3.3}{Modifiers}{171}
|
||||
@numchapentry{Installing Bash}{10}{Installing Bash}{172}
|
||||
@numsecentry{Basic Installation}{10.1}{Basic Installation}{172}
|
||||
@numsecentry{Compilers and Options}{10.2}{Compilers and Options}{173}
|
||||
@numsecentry{Compiling For Multiple Architectures}{10.3}{Compiling For Multiple Architectures}{173}
|
||||
@numsecentry{Installation Names}{10.4}{Installation Names}{174}
|
||||
@numsecentry{Specifying the System Type}{10.5}{Specifying the System Type}{174}
|
||||
@numsecentry{Sharing Defaults}{10.6}{Sharing Defaults}{174}
|
||||
@numsecentry{Operation Controls}{10.7}{Operation Controls}{175}
|
||||
@numsecentry{Optional Features}{10.8}{Optional Features}{175}
|
||||
@appentry{Reporting Bugs}{A}{Reporting Bugs}{181}
|
||||
@appentry{Major Differences From The Bourne Shell}{B}{Major Differences From The Bourne Shell}{182}
|
||||
@appsecentry{Implementation Differences From The SVR4.2 Shell}{B.1}{}{187}
|
||||
@appentry{GNU Free Documentation License}{C}{GNU Free Documentation License}{189}
|
||||
@appentry{Indexes}{D}{Indexes}{197}
|
||||
@appsecentry{Index of Shell Builtin Commands}{D.1}{Builtin Index}{197}
|
||||
@appsecentry{Index of Shell Reserved Words}{D.2}{Reserved Word Index}{198}
|
||||
@appsecentry{Parameter and Variable Index}{D.3}{Variable Index}{199}
|
||||
@appsecentry{Function Index}{D.4}{Function Index}{201}
|
||||
@appsecentry{Concept Index}{D.5}{Concept Index}{203}
|
||||
@numsecentry{Programmable Completion Builtins}{8.7}{Programmable Completion Builtins}{159}
|
||||
@numsecentry{A Programmable Completion Example}{8.8}{A Programmable Completion Example}{163}
|
||||
@numchapentry{Using History Interactively}{9}{Using History Interactively}{166}
|
||||
@numsecentry{Bash History Facilities}{9.1}{Bash History Facilities}{166}
|
||||
@numsecentry{Bash History Builtins}{9.2}{Bash History Builtins}{167}
|
||||
@numsecentry{History Expansion}{9.3}{History Interaction}{169}
|
||||
@numsubsecentry{Event Designators}{9.3.1}{Event Designators}{170}
|
||||
@numsubsecentry{Word Designators}{9.3.2}{Word Designators}{171}
|
||||
@numsubsecentry{Modifiers}{9.3.3}{Modifiers}{172}
|
||||
@numchapentry{Installing Bash}{10}{Installing Bash}{173}
|
||||
@numsecentry{Basic Installation}{10.1}{Basic Installation}{173}
|
||||
@numsecentry{Compilers and Options}{10.2}{Compilers and Options}{174}
|
||||
@numsecentry{Compiling For Multiple Architectures}{10.3}{Compiling For Multiple Architectures}{174}
|
||||
@numsecentry{Installation Names}{10.4}{Installation Names}{175}
|
||||
@numsecentry{Specifying the System Type}{10.5}{Specifying the System Type}{175}
|
||||
@numsecentry{Sharing Defaults}{10.6}{Sharing Defaults}{175}
|
||||
@numsecentry{Operation Controls}{10.7}{Operation Controls}{176}
|
||||
@numsecentry{Optional Features}{10.8}{Optional Features}{176}
|
||||
@appentry{Reporting Bugs}{A}{Reporting Bugs}{182}
|
||||
@appentry{Major Differences From The Bourne Shell}{B}{Major Differences From The Bourne Shell}{183}
|
||||
@appsecentry{Implementation Differences From The SVR4.2 Shell}{B.1}{}{188}
|
||||
@appentry{GNU Free Documentation License}{C}{GNU Free Documentation License}{190}
|
||||
@appentry{Indexes}{D}{Indexes}{198}
|
||||
@appsecentry{Index of Shell Builtin Commands}{D.1}{Builtin Index}{198}
|
||||
@appsecentry{Index of Shell Reserved Words}{D.2}{Reserved Word Index}{199}
|
||||
@appsecentry{Parameter and Variable Index}{D.3}{Variable Index}{200}
|
||||
@appsecentry{Function Index}{D.4}{Function Index}{202}
|
||||
@appsecentry{Concept Index}{D.5}{Concept Index}{204}
|
||||
|
||||
+682
-679
File diff suppressed because it is too large
Load Diff
Binary file not shown.
+2
-2
@@ -2,10 +2,10 @@
|
||||
Copyright (C) 1988-2024 Free Software Foundation, Inc.
|
||||
@end ignore
|
||||
|
||||
@set LASTCHANGE Mon Nov 25 15:20:23 EST 2024
|
||||
@set LASTCHANGE Fri Nov 29 18:18:39 EST 2024
|
||||
|
||||
@set EDITION 5.3
|
||||
@set VERSION 5.3
|
||||
|
||||
@set UPDATED 25 November 2024
|
||||
@set UPDATED 29 November 2024
|
||||
@set UPDATED-MONTH November 2024
|
||||
|
||||
+46
-47
@@ -101,8 +101,8 @@ HHIISSTTOORRYY EEXXPPAANNSSIIOONN
|
||||
this is the command word.
|
||||
_n The _nth word.
|
||||
^^ The first argument: word 1.
|
||||
$$ The last word. This is usually the last argument, but will ex-
|
||||
pand to the zeroth word if there is only one word in the line.
|
||||
$$ The last word. This is usually the last argument, but expands
|
||||
to the zeroth word if there is only one word in the line.
|
||||
%% The first word matched by the most recent "?_s_t_r_i_n_g?" search, if
|
||||
the search string begins with a character that is part of a
|
||||
word. By default, searches begin at the end of each line and
|
||||
@@ -138,12 +138,12 @@ HHIISSTTOORRYY EEXXPPAANNSSIIOONN
|
||||
Substitute _n_e_w for the first occurrence of _o_l_d in the event
|
||||
line. Any character may be used as the delimiter in place of /.
|
||||
The final delimiter is optional if it is the last character of
|
||||
the event line. A single backslash will quote the delimiter in
|
||||
_o_l_d and _n_e_w. If & appears in _n_e_w, it is replaced with _o_l_d. A
|
||||
single backslash will quote the &. If _o_l_d is null, it is set to
|
||||
the last _o_l_d substituted, or, if no previous history substitu-
|
||||
tions took place, the last _s_t_r_i_n_g in a !!??_s_t_r_i_n_g[[??]] search. If
|
||||
_n_e_w is null, each matching _o_l_d is deleted.
|
||||
the event line. A single backslash quotes the delimiter in _o_l_d
|
||||
and _n_e_w. If & appears in _n_e_w, it is replaced with _o_l_d. A sin-
|
||||
gle backslash quotes the &. If _o_l_d is null, it is set to the
|
||||
last _o_l_d substituted, or, if no previous history substitutions
|
||||
took place, the last _s_t_r_i_n_g in a !!??_s_t_r_i_n_g[[??]] search. If _n_e_w is
|
||||
null, each matching _o_l_d is deleted.
|
||||
&& Repeat the previous substitution.
|
||||
gg Cause changes to be applied over the entire event line. This is
|
||||
used in conjunction with "::ss" (e.g., "::ggss//_o_l_d//_n_e_w//") or "::&&".
|
||||
@@ -413,12 +413,11 @@ HHiissttoorryy FFuunnccttiioonnss
|
||||
_*_c_i_n_d_e_x is modified to point to after the event specifier. At function
|
||||
entry, _c_i_n_d_e_x points to the index into _s_t_r_i_n_g where the history event
|
||||
specification begins. _q_c_h_a_r is a character that is allowed to end the
|
||||
event specification in addition to the ``normal'' terminating charac-
|
||||
ters.
|
||||
event specification in addition to the "normal" terminating characters.
|
||||
|
||||
_c_h_a_r _*_* hhiissttoorryy__ttookkeenniizzee (_c_o_n_s_t _c_h_a_r _*_s_t_r_i_n_g)
|
||||
Return an array of tokens parsed out of _s_t_r_i_n_g, much as the shell
|
||||
might. The tokens are split on the characters in the hhiissttoorryy__wwoorrdd__ddee--
|
||||
Return an array of tokens parsed out of _s_t_r_i_n_g, much as the shell
|
||||
might. The tokens are split on the characters in the hhiissttoorryy__wwoorrdd__ddee--
|
||||
lliimmiitteerrss variable, and shell quoting conventions are obeyed.
|
||||
|
||||
_c_h_a_r _* hhiissttoorryy__aarrgg__eexxttrraacctt (_i_n_t _f_i_r_s_t_, _i_n_t _l_a_s_t_, _c_o_n_s_t _c_h_a_r _*_s_t_r_i_n_g)
|
||||
@@ -442,10 +441,10 @@ HHiissttoorryy FFuunnccttiioonnss
|
||||
_i_n_t hhiissttoorryy__wwrriittee__ttiimmeessttaammppss
|
||||
If non-zero, timestamps are written to the history file, so they can be
|
||||
preserved between sessions. The default value is 0, meaning that time-
|
||||
stamps are not saved. The current timestamp format uses the value of
|
||||
_h_i_s_t_o_r_y___c_o_m_m_e_n_t___c_h_a_r to delimit timestamp entries in the history file.
|
||||
If that variable does not have a value (the default), timestamps will
|
||||
not be written.
|
||||
stamps are not saved. The current timestamp format uses the value of
|
||||
_h_i_s_t_o_r_y___c_o_m_m_e_n_t___c_h_a_r to delimit timestamp entries in the history file.
|
||||
If that variable does not have a value (the default), the history li-
|
||||
brary will not write timestamps.
|
||||
|
||||
_c_h_a_r hhiissttoorryy__eexxppaannssiioonn__cchhaarr
|
||||
The character that introduces a history event. The default is !!. Set-
|
||||
@@ -456,50 +455,50 @@ HHiissttoorryy FFuunnccttiioonnss
|
||||
line. The default is ^^.
|
||||
|
||||
_c_h_a_r hhiissttoorryy__ccoommmmeenntt__cchhaarr
|
||||
During tokenization, if this character is seen as the first character
|
||||
of a word, then it and all subsequent characters up to a newline are
|
||||
ignored, suppressing history expansion for the remainder of the line.
|
||||
During tokenization, if this character is seen as the first character
|
||||
of a word, then it and all subsequent characters up to a newline are
|
||||
ignored, suppressing history expansion for the remainder of the line.
|
||||
This is disabled by default.
|
||||
|
||||
_c_h_a_r _* hhiissttoorryy__wwoorrdd__ddeelliimmiitteerrss
|
||||
The characters that separate tokens for hhiissttoorryy__ttookkeenniizzee(()). The de-
|
||||
The characters that separate tokens for hhiissttoorryy__ttookkeenniizzee(()). The de-
|
||||
fault value is "" \\tt\\nn(())<<>>;;&&||"".
|
||||
|
||||
_c_h_a_r _* hhiissttoorryy__nnoo__eexxppaanndd__cchhaarrss
|
||||
The list of characters which inhibit history expansion if found immedi-
|
||||
ately following hhiissttoorryy__eexxppaannssiioonn__cchhaarr. The default is space, tab,
|
||||
ately following hhiissttoorryy__eexxppaannssiioonn__cchhaarr. The default is space, tab,
|
||||
newline, \\rr, and ==.
|
||||
|
||||
_c_h_a_r _* hhiissttoorryy__sseeaarrcchh__ddeelliimmiitteerr__cchhaarrss
|
||||
The list of additional characters which can delimit a history search
|
||||
string, in addition to space, tab, _: and _? in the case of a substring
|
||||
The list of additional characters which can delimit a history search
|
||||
string, in addition to space, tab, _: and _? in the case of a substring
|
||||
search. The default is empty.
|
||||
|
||||
_i_n_t hhiissttoorryy__qquuootteess__iinnhhiibbiitt__eexxppaannssiioonn
|
||||
If non-zero, the history expansion code implements shell-like quoting:
|
||||
If non-zero, the history expansion code implements shell-like quoting:
|
||||
single-quoted words are not scanned for the history expansion character
|
||||
or the history comment character, and double-quoted words may have his-
|
||||
tory expansion performed, since single quotes are not special within
|
||||
tory expansion performed, since single quotes are not special within
|
||||
double quotes. The default value is 0.
|
||||
|
||||
_i_n_t hhiissttoorryy__qquuoottiinngg__ssttaattee
|
||||
An application may set this variable to indicate that the current line
|
||||
being expanded is subject to existing quoting. If set to _', the history
|
||||
expansion function will assume that the line is single-quoted and in-
|
||||
hibit expansion until it reads an unquoted closing single quote; if set
|
||||
to _", history expansion will assume the line is double quoted until it
|
||||
reads an unquoted closing double quote. If set to zero, the default,
|
||||
the history expansion function will assume the line is not quoted and
|
||||
treat quote characters within the line as described above. This is
|
||||
only effective if hhiissttoorryy__qquuootteess__iinnhhiibbiitt__eexxppaannssiioonn is set.
|
||||
An application may set this variable to indicate that the current line
|
||||
being expanded is subject to existing quoting. If set to _', history
|
||||
expansion assumes that the line is single-quoted and inhibit expansion
|
||||
until it reads an unquoted closing single quote; if set to _", history
|
||||
expansion assumes the line is double quoted until it reads an unquoted
|
||||
closing double quote. If set to zero, the default, history expansion
|
||||
assumes the line is not quoted and treats quote characters within the
|
||||
line as described above. This is only effective if hhiissttoorryy__qquuootteess__iinn--
|
||||
hhiibbiitt__eexxppaannssiioonn is set.
|
||||
|
||||
_r_l___l_i_n_e_b_u_f___f_u_n_c___t _* hhiissttoorryy__iinnhhiibbiitt__eexxppaannssiioonn__ffuunnccttiioonn
|
||||
This should be set to the address of a function that takes two argu-
|
||||
ments: a cchhaarr ** (_s_t_r_i_n_g) and an iinntt index into that string (_i). It
|
||||
should return a non-zero value if the history expansion starting at
|
||||
_s_t_r_i_n_g_[_i_] should not be performed; zero if the expansion should be
|
||||
done. It is intended for use by applications like bbaasshh that use the
|
||||
history expansion character for additional purposes. By default, this
|
||||
This should be set to the address of a function that takes two argu-
|
||||
ments: a cchhaarr ** (_s_t_r_i_n_g) and an iinntt index into that string (_i). It
|
||||
should return a non-zero value if the history expansion starting at
|
||||
_s_t_r_i_n_g_[_i_] should not be performed; zero if the expansion should be
|
||||
done. It is intended for use by applications like bbaasshh that use the
|
||||
history expansion character for additional purposes. By default, this
|
||||
variable is set to NNUULLLL.
|
||||
|
||||
FFIILLEESS
|
||||
@@ -520,17 +519,17 @@ AAUUTTHHOORRSS
|
||||
chet.ramey@case.edu
|
||||
|
||||
BBUUGG RREEPPOORRTTSS
|
||||
If you find a bug in the hhiissttoorryy library, you should report it. But
|
||||
first, you should make sure that it really is a bug, and that it ap-
|
||||
If you find a bug in the hhiissttoorryy library, you should report it. But
|
||||
first, you should make sure that it really is a bug, and that it ap-
|
||||
pears in the latest version of the hhiissttoorryy library that you have.
|
||||
|
||||
Once you have determined that a bug actually exists, mail a bug report
|
||||
to _b_u_g_-_r_e_a_d_l_i_n_e@_g_n_u_._o_r_g. If you have a fix, you are welcome to mail
|
||||
that as well! Suggestions and `philosophical' bug reports may be
|
||||
mailed to _b_u_g_-_r_e_a_d_l_i_n_e@_g_n_u_._o_r_g or posted to the Usenet newsgroup
|
||||
Once you have determined that a bug actually exists, mail a bug report
|
||||
to _b_u_g_-_r_e_a_d_l_i_n_e@_g_n_u_._o_r_g. If you have a fix, you are welcome to mail
|
||||
that as well! Suggestions and "philosophical" bug reports may be
|
||||
mailed to _b_u_g_-_r_e_a_d_l_i_n_e@_g_n_u_._o_r_g or posted to the Usenet newsgroup
|
||||
ggnnuu..bbaasshh..bbuugg.
|
||||
|
||||
Comments and bug reports concerning this manual page should be directed
|
||||
to _c_h_e_t_._r_a_m_e_y_@_c_a_s_e_._e_d_u.
|
||||
|
||||
GNU History 8.3 2024 October 10 _H_I_S_T_O_R_Y(3)
|
||||
GNU History 8.3 2024 November 29 _H_I_S_T_O_R_Y(3)
|
||||
|
||||
+37
-19
@@ -6,9 +6,9 @@
|
||||
.\" Case Western Reserve University
|
||||
.\" chet.ramey@case.edu
|
||||
.\"
|
||||
.\" Last Change: Thu Oct 10 16:50:53 EDT 2024
|
||||
.\" Last Change: Fri Nov 29 18:17:58 EST 2024
|
||||
.\"
|
||||
.TH HISTORY 3 "2024 October 10" "GNU History 8.3"
|
||||
.TH HISTORY 3 "2024 November 29" "GNU History 8.3"
|
||||
.\"
|
||||
.ie \n(.g \{\
|
||||
.ds ' \(aq
|
||||
@@ -18,7 +18,7 @@
|
||||
.\}
|
||||
.el \{\
|
||||
.ds ' '
|
||||
.\" not usable in macro arguments on AT&T troff (DWB, Solaris 10)
|
||||
.\" \*" is not usable in macro arguments on AT&T troff (DWB, Solaris 10)
|
||||
.ds " ""\" two adjacent quotes and no space before this comment
|
||||
.ds ^ ^
|
||||
.ds ~ ~
|
||||
@@ -26,6 +26,7 @@
|
||||
.
|
||||
.\" Fix broken EX/EE macros on DWB troff.
|
||||
.\" Detect it: only DWB sets up a `)Y` register.
|
||||
.if \n(.g .nr )Y 0 \" silence "groff -wreg" warning
|
||||
.if \n()Y \{\
|
||||
.\" Revert the undesired changes to indentation.
|
||||
.am EX
|
||||
@@ -38,10 +39,15 @@
|
||||
.
|
||||
.\" File Name macro. This used to be `.PN', for Path Name,
|
||||
.\" but Sun doesn't seem to like that very much.
|
||||
.\" \% at the beginning of the string protects the filename from hyphenation.
|
||||
.\"
|
||||
.de FN
|
||||
\%\fI\|\\$1\|\fP
|
||||
..
|
||||
.\"
|
||||
.\" Quotation macro: generate consistent quoted strings that don't rely
|
||||
.\" on the presence of the `CW' constant-width font.
|
||||
.\"
|
||||
.de Q
|
||||
.ie \n(.g \(lq\\$1\(rq\\$2
|
||||
.el \{\
|
||||
@@ -230,7 +236,7 @@ The first argument: word 1.
|
||||
.TP
|
||||
.B $
|
||||
The last word.
|
||||
This is usually the last argument, but will expand to the
|
||||
This is usually the last argument, but expands to the
|
||||
zeroth word if there is only one word in the line.
|
||||
.TP
|
||||
.B %
|
||||
@@ -312,7 +318,7 @@ in the event line.
|
||||
Any character may be used as the delimiter in place of /.
|
||||
The final delimiter is optional if it is the last character of the
|
||||
event line.
|
||||
A single backslash will quote the delimiter in
|
||||
A single backslash quotes the delimiter in
|
||||
.I old
|
||||
and
|
||||
.IR new .
|
||||
@@ -320,7 +326,7 @@ If & appears in
|
||||
.IR new ,
|
||||
it is replaced with
|
||||
.IR old .
|
||||
A single backslash will quote the &.
|
||||
A single backslash quotes the &.
|
||||
If
|
||||
.I old
|
||||
is null, it is set to the last
|
||||
@@ -399,11 +405,13 @@ declared as follows:
|
||||
.Vb "typedef void *" histdata_t;
|
||||
.PP
|
||||
.nf
|
||||
.EX
|
||||
typedef struct _hist_entry {
|
||||
char *line;
|
||||
char *timestamp;
|
||||
histdata_t data;
|
||||
} HIST_ENTRY;
|
||||
.EE
|
||||
.fi
|
||||
.PP
|
||||
The history list itself might therefore be declared as
|
||||
@@ -641,7 +649,9 @@ Returns the text of the history event beginning at \fIstring\fP +
|
||||
specifier. At function entry, \fIcindex\fP points to the index into
|
||||
\fIstring\fP where the history event specification begins. \fIqchar\fP
|
||||
is a character that is allowed to end the event specification in addition
|
||||
to the ``normal'' terminating characters.
|
||||
to the
|
||||
.Q normal
|
||||
terminating characters.
|
||||
.PP
|
||||
.F1 "char **" history_tokenize "const char *string"
|
||||
Return an array of tokens parsed out of \fIstring\fP, much as the
|
||||
@@ -673,16 +683,20 @@ If non-zero, timestamps are written to the history file, so they can be
|
||||
preserved between sessions. The default value is 0, meaning that
|
||||
timestamps are not saved.
|
||||
The current timestamp format uses the value of \fIhistory_comment_char\fP
|
||||
to delimit timestamp entries in the history file. If that variable does
|
||||
not have a value (the default), timestamps will not be written.
|
||||
to delimit timestamp entries in the history file.
|
||||
If that variable does
|
||||
not have a value (the default),
|
||||
the history library will not write timestamps.
|
||||
.PP
|
||||
.Vb char history_expansion_char
|
||||
The character that introduces a history event. The default is \fB!\fP.
|
||||
The character that introduces a history event.
|
||||
The default is \fB!\fP.
|
||||
Setting this to 0 inhibits history expansion.
|
||||
.PP
|
||||
.Vb char history_subst_char
|
||||
The character that invokes word substitution if found at the start of
|
||||
a line. The default is \fB\*^\fP.
|
||||
a line.
|
||||
The default is \fB\*^\fP.
|
||||
.PP
|
||||
.Vb char history_comment_char
|
||||
During tokenization, if this character is seen as the first character
|
||||
@@ -714,13 +728,15 @@ The default value is 0.
|
||||
.PP
|
||||
.Vb int history_quoting_state
|
||||
An application may set this variable to indicate that the current line
|
||||
being expanded is subject to existing quoting. If set to \fI\*'\fP, the
|
||||
history expansion function will assume that the line is single-quoted and
|
||||
inhibit expansion until it reads an unquoted closing single quote; if set
|
||||
to \fI\*"\fP, history expansion will assume the line is double quoted until
|
||||
it reads an unquoted closing double quote. If set to zero, the default,
|
||||
the history expansion function will assume the line is not quoted and
|
||||
treat quote characters within the line as described above.
|
||||
being expanded is subject to existing quoting.
|
||||
If set to \fI\*'\fP,
|
||||
history expansion assumes that the line is single-quoted and
|
||||
inhibit expansion until it reads an unquoted closing single quote;
|
||||
if set to \fI\*"\fP, history expansion assumes the line is double quoted
|
||||
until it reads an unquoted closing double quote.
|
||||
If set to zero, the default,
|
||||
history expansion assumes the line is not quoted and
|
||||
treats quote characters within the line as described above.
|
||||
This is only effective if \fBhistory_quotes_inhibit_expansion\fP is set.
|
||||
.PP
|
||||
.Vb "rl_linebuf_func_t *" history_inhibit_expansion_function
|
||||
@@ -770,7 +786,9 @@ library that you have.
|
||||
Once you have determined that a bug actually exists, mail a
|
||||
bug report to \fIbug\-readline\fP@\fIgnu.org\fP.
|
||||
If you have a fix, you are welcome to mail that
|
||||
as well! Suggestions and `philosophical' bug reports may be mailed
|
||||
as well! Suggestions and
|
||||
.Q philosophical
|
||||
bug reports may be mailed
|
||||
to \fIbug\-readline\fP@\fIgnu.org\fP or posted to the Usenet
|
||||
newsgroup
|
||||
.BR gnu.bash.bug .
|
||||
|
||||
Binary file not shown.
@@ -1,6 +1,6 @@
|
||||
<HTML>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<!-- Created on November, 1 2024 by texi2html 1.64 -->
|
||||
<!-- Created on December, 2 2024 by texi2html 1.64 -->
|
||||
<!--
|
||||
Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
|
||||
Karl Berry <karl@freefriends.org>
|
||||
@@ -309,7 +309,7 @@ For the shell, and many other, applications, this is the command word.
|
||||
|
||||
<DT><CODE>$</CODE>
|
||||
<DD>The last word.
|
||||
This is usually the last argument, but will expand to the
|
||||
This is usually the last argument, but expands to the
|
||||
zeroth word if there is only one word in the line.
|
||||
<P>
|
||||
|
||||
@@ -401,7 +401,7 @@ Any character may be used as the delimiter in place of <SAMP>`/'</SAMP>.
|
||||
The delimiter may be quoted in <VAR>old</VAR> and <VAR>new</VAR>
|
||||
with a single backslash.
|
||||
If <SAMP>`&'</SAMP> appears in <VAR>new</VAR>, it is replaced with <VAR>old</VAR>.
|
||||
A single backslash will quote the <SAMP>`&'</SAMP> in <VAR>old</VAR> and <VAR>new</VAR>.
|
||||
A single backslash quotes the <SAMP>`&'</SAMP> in <VAR>old</VAR> and <VAR>new</VAR>.
|
||||
If <VAR>old</VAR> is null, it is set to the last <VAR>old</VAR>
|
||||
substituted, or, if no previous history substitutions took place,
|
||||
the last <VAR>string</VAR>
|
||||
@@ -1188,8 +1188,8 @@ The default value is 0, meaning that timestamps are not saved.
|
||||
|
||||
The current timestamp format uses the value of <VAR>history_comment_char</VAR>
|
||||
to delimit timestamp entries in the history file.
|
||||
If that variable does not have a value (the default), this will not
|
||||
write timestamps.
|
||||
If that variable does not have a value (the default),
|
||||
the history library will not write timestamps.
|
||||
</DL>
|
||||
</P><P>
|
||||
|
||||
@@ -1265,14 +1265,15 @@ The default value is 0.
|
||||
<DT><U>Variable:</U> int <B>history_quoting_state</B>
|
||||
<DD>An application may set this variable to indicate that the current line
|
||||
being expanded is subject to existing quoting.
|
||||
If set to <SAMP>`''</SAMP>, the
|
||||
history expansion function will assume that the line is single-quoted and
|
||||
If set to <SAMP>`''</SAMP>,
|
||||
history expansion assumes that the line is single-quoted and
|
||||
inhibit expansion until it reads an unquoted closing single quote;
|
||||
if set to <SAMP>`"'</SAMP>, history expansion will assume the line is
|
||||
double quoted until it reads an unquoted closing double quote.
|
||||
if set to <SAMP>`"'</SAMP>,
|
||||
history expansion assumes the line is double quoted
|
||||
until it reads an unquoted closing double quote.
|
||||
If set to 0, the default,
|
||||
the history expansion function will assume the line is not quoted and
|
||||
treat quote characters within the line as described above.
|
||||
history expansion assumes the line is not quoted and
|
||||
treats quote characters within the line as described above.
|
||||
This is only effective if <VAR>history_quotes_inhibit_expansion</VAR> is set.
|
||||
This is intended for use by applications like Bash which allow
|
||||
quoted strings to span multiple lines.
|
||||
@@ -2263,7 +2264,7 @@ to permit their use in free software.
|
||||
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="history.html#SEC_About"> ? </A>]</TD>
|
||||
</TR></TABLE>
|
||||
<H1>About this document</H1>
|
||||
This document was generated by <I>Chet Ramey</I> on <I>November, 1 2024</I>
|
||||
This document was generated by <I>Chet Ramey</I> on <I>December, 2 2024</I>
|
||||
using <A HREF="http://www.mathematik.uni-kl.de/~obachman/Texi2html
|
||||
"><I>texi2html</I></A>
|
||||
<P></P>
|
||||
@@ -2425,7 +2426,7 @@ the following structure:
|
||||
<BR>
|
||||
<FONT SIZE="-1">
|
||||
This document was generated
|
||||
by <I>Chet Ramey</I> on <I>November, 1 2024</I>
|
||||
by <I>Chet Ramey</I> on <I>December, 2 2024</I>
|
||||
using <A HREF="http://www.mathematik.uni-kl.de/~obachman/Texi2html
|
||||
"><I>texi2html</I></A>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
This is history.info, produced by makeinfo version 7.1 from
|
||||
history.texi.
|
||||
|
||||
This document describes the GNU History library (version 8.3, 15
|
||||
This document describes the GNU History library (version 8.3, 29
|
||||
November 2024), a programming tool that provides a consistent user
|
||||
interface for recalling lines of previously typed input.
|
||||
|
||||
@@ -194,8 +194,8 @@ spaces.
|
||||
The first argument: word 1.
|
||||
|
||||
‘$’
|
||||
The last word. This is usually the last argument, but will expand
|
||||
to the zeroth word if there is only one word in the line.
|
||||
The last word. This is usually the last argument, but expands to
|
||||
the zeroth word if there is only one word in the line.
|
||||
|
||||
‘%’
|
||||
The first word matched by the most recent ‘?STRING?’ search, if the
|
||||
@@ -253,11 +253,11 @@ or edit, the word or words selected from the history event.
|
||||
Any character may be used as the delimiter in place of ‘/’. The
|
||||
delimiter may be quoted in OLD and NEW with a single backslash. If
|
||||
‘&’ appears in NEW, it is replaced with OLD. A single backslash
|
||||
will quote the ‘&’ in OLD and NEW. If OLD is null, it is set to
|
||||
the last OLD substituted, or, if no previous history substitutions
|
||||
took place, the last STRING in a !?STRING‘[?]’ search. If NEW is
|
||||
null, each matching OLD is deleted. The final delimiter is
|
||||
optional if it is the last character on the input line.
|
||||
quotes the ‘&’ in OLD and NEW. If OLD is null, it is set to the
|
||||
last OLD substituted, or, if no previous history substitutions took
|
||||
place, the last STRING in a !?STRING‘[?]’ search. If NEW is null,
|
||||
each matching OLD is deleted. The final delimiter is optional if
|
||||
it is the last character on the input line.
|
||||
|
||||
‘&’
|
||||
Repeat the previous substitution.
|
||||
@@ -687,8 +687,8 @@ GNU History Library.
|
||||
|
||||
The current timestamp format uses the value of HISTORY_COMMENT_CHAR
|
||||
to delimit timestamp entries in the history file. If that variable
|
||||
does not have a value (the default), this will not write
|
||||
timestamps.
|
||||
does not have a value (the default), the history library will not
|
||||
write timestamps.
|
||||
|
||||
-- Variable: char history_expansion_char
|
||||
The character that introduces a history event. The default is ‘!’.
|
||||
@@ -729,16 +729,15 @@ GNU History Library.
|
||||
-- Variable: int history_quoting_state
|
||||
An application may set this variable to indicate that the current
|
||||
line being expanded is subject to existing quoting. If set to ‘'’,
|
||||
the history expansion function will assume that the line is
|
||||
single-quoted and inhibit expansion until it reads an unquoted
|
||||
closing single quote; if set to ‘"’, history expansion will assume
|
||||
the line is double quoted until it reads an unquoted closing double
|
||||
quote. If set to 0, the default, the history expansion function
|
||||
will assume the line is not quoted and treat quote characters
|
||||
within the line as described above. This is only effective if
|
||||
HISTORY_QUOTES_INHIBIT_EXPANSION is set. This is intended for use
|
||||
by applications like Bash which allow quoted strings to span
|
||||
multiple lines.
|
||||
history expansion assumes that the line is single-quoted and
|
||||
inhibit expansion until it reads an unquoted closing single quote;
|
||||
if set to ‘"’, history expansion assumes the line is double quoted
|
||||
until it reads an unquoted closing double quote. If set to 0, the
|
||||
default, history expansion assumes the line is not quoted and
|
||||
treats quote characters within the line as described above. This
|
||||
is only effective if HISTORY_QUOTES_INHIBIT_EXPANSION is set. This
|
||||
is intended for use by applications like Bash which allow quoted
|
||||
strings to span multiple lines.
|
||||
|
||||
-- Variable: rl_linebuf_func_t * history_inhibit_expansion_function
|
||||
This should be set to the address of a function that takes two
|
||||
@@ -1375,7 +1374,7 @@ Appendix C Function and Variable Index
|
||||
(line 14)
|
||||
* history_get_time: Information About the History List.
|
||||
(line 28)
|
||||
* history_inhibit_expansion_function: History Variables. (line 79)
|
||||
* history_inhibit_expansion_function: History Variables. (line 78)
|
||||
* history_is_stifled: History List Management.
|
||||
(line 52)
|
||||
* history_length: History Variables. (line 12)
|
||||
@@ -1435,23 +1434,23 @@ Node: Using History Interactively1493
|
||||
Node: History Interaction2001
|
||||
Node: Event Designators4715
|
||||
Node: Word Designators6217
|
||||
Node: Modifiers8528
|
||||
Node: Programming with GNU History10179
|
||||
Node: Introduction to History10923
|
||||
Node: History Storage12655
|
||||
Node: History Functions13835
|
||||
Node: Initializing History and State Management14824
|
||||
Node: History List Management15627
|
||||
Node: Information About the History List18058
|
||||
Node: Moving Around the History List19671
|
||||
Node: Searching the History List20751
|
||||
Node: Managing the History File22697
|
||||
Node: History Expansion25167
|
||||
Node: History Variables27140
|
||||
Node: History Programming Example31282
|
||||
Node: GNU Free Documentation License33936
|
||||
Node: Concept Index59111
|
||||
Node: Function and Variable Index59816
|
||||
Node: Modifiers8524
|
||||
Node: Programming with GNU History10171
|
||||
Node: Introduction to History10915
|
||||
Node: History Storage12647
|
||||
Node: History Functions13827
|
||||
Node: Initializing History and State Management14816
|
||||
Node: History List Management15619
|
||||
Node: Information About the History List18050
|
||||
Node: Moving Around the History List19663
|
||||
Node: Searching the History List20743
|
||||
Node: Managing the History File22689
|
||||
Node: History Expansion25159
|
||||
Node: History Variables27132
|
||||
Node: History Programming Example31247
|
||||
Node: GNU Free Documentation License33901
|
||||
Node: Concept Index59076
|
||||
Node: Function and Variable Index59781
|
||||
|
||||
End Tag Table
|
||||
|
||||
|
||||
Binary file not shown.
+123
-124
@@ -1,7 +1,7 @@
|
||||
%!PS-Adobe-2.0
|
||||
%%Creator: dvips(k) 2024.1 (TeX Live 2024) Copyright 2024 Radical Eye Software
|
||||
%%Title: history.dvi
|
||||
%%CreationDate: Fri Nov 1 22:18:32 2024
|
||||
%%CreationDate: Mon Dec 2 20:02:16 2024
|
||||
%%Pages: 25
|
||||
%%PageOrder: Ascend
|
||||
%%BoundingBox: 0 0 596 842
|
||||
@@ -12,7 +12,7 @@
|
||||
%DVIPSWebPage: (www.radicaleye.com)
|
||||
%DVIPSCommandLine: dvips -D 300 -o history.ps history.dvi
|
||||
%DVIPSParameters: dpi=300
|
||||
%DVIPSSource: TeX output 2024.11.01:1818
|
||||
%DVIPSSource: TeX output 2024.12.02:1202
|
||||
%%BeginProcSet: tex.pro 0 0
|
||||
%!
|
||||
/TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S
|
||||
@@ -5244,29 +5244,30 @@ ifelse
|
||||
%%Page: 1 1
|
||||
TeXDict begin 1 0 bop 75 659 a Fr(GNU)33 b(History)e(Library)p
|
||||
75 709 1800 17 v 960 757 a Fq(Edition)14 b(8.3,)g(for)h
|
||||
Fp(History)f(Library)g Fq(V)l(ersion)h(8.3.)1608 811
|
||||
y(Octob)q(er)h(2024)75 2463 y Fo(Chet)22 b(Ramey)-6 b(,)23
|
||||
b(Case)e(W)-6 b(estern)23 b(Reserv)n(e)f(Univ)n(ersit)n(y)75
|
||||
Fp(History)f(Library)g Fq(V)l(ersion)h(8.3.)1569 811
|
||||
y(No)o(v)o(em)o(b)q(er)g(2024)75 2463 y Fo(Chet)22 b(Ramey)-6
|
||||
b(,)23 b(Case)e(W)-6 b(estern)23 b(Reserv)n(e)f(Univ)n(ersit)n(y)75
|
||||
2534 y(Brian)g(F)-6 b(o)n(x,)23 b(F)-6 b(ree)23 b(Soft)n(w)n(are)f(F)-6
|
||||
b(oundation)p 75 2570 1800 9 v eop end
|
||||
%%Page: 2 2
|
||||
TeXDict begin 2 1 bop 75 2207 a Fq(This)17 b(do)q(cumen)o(t)i(describ)q
|
||||
(es)f(the)g(GNU)g(History)f(library)f(\(v)o(ersion)h(8.3,)g(15)g(Octob)
|
||||
q(er)i(2024\),)e(a)g(pro-)75 2262 y(gramming)10 b(to)q(ol)g(that)g(pro)
|
||||
o(vides)h(a)g(consisten)o(t)f(user)i(in)o(terface)e(for)h(recalling)f
|
||||
(lines)g(of)h(previously)g(t)o(yp)q(ed)75 2316 y(input.)75
|
||||
2384 y(Cop)o(yrigh)o(t)301 2383 y(c)289 2384 y Fn(\015)k
|
||||
Fq(1988{2024)e(F)l(ree)i(Soft)o(w)o(are)f(F)l(oundation,)g(Inc.)195
|
||||
2451 y(P)o(ermission)9 b(is)h(gran)o(ted)f(to)h(cop)o(y)l(,)h
|
||||
(distribute)e(and/or)h(mo)q(dify)g(this)f(do)q(cumen)o(t)i(under)g(the)
|
||||
195 2506 y(terms)h(of)g(the)h(GNU)g(F)l(ree)f(Do)q(cumen)o(tation)g
|
||||
(License,)h(V)l(ersion)g(1.3)f(or)g(an)o(y)g(later)g(v)o(ersion)195
|
||||
2560 y(published)23 b(b)o(y)f(the)h(F)l(ree)f(Soft)o(w)o(are)f(F)l
|
||||
(oundation;)k(with)c(no)i(In)o(v)m(arian)o(t)e(Sections,)j(no)195
|
||||
2615 y(F)l(ron)o(t-Co)o(v)o(er)13 b(T)l(exts,)h(and)g(no)h(Bac)o(k-Co)o
|
||||
(v)o(er)e(T)l(exts.)20 b(A)14 b(cop)o(y)g(of)g(the)h(license)f(is)g
|
||||
(included)195 2670 y(in)h(the)g(section)g(en)o(titled)f(\\GNU)h(F)l
|
||||
(ree)g(Do)q(cumen)o(tation)g(License".)p eop end
|
||||
TeXDict begin 2 1 bop 75 2207 a Fq(This)22 b(do)q(cumen)o(t)h(describ)q
|
||||
(es)h(the)e(GNU)h(History)e(library)h(\(v)o(ersion)f(8.3,)i(29)f(No)o
|
||||
(v)o(em)o(b)q(er)h(2024\),)f(a)75 2262 y(programming)14
|
||||
b(to)q(ol)h(that)h(pro)o(vides)f(a)h(consisten)o(t)f(user)h(in)o
|
||||
(terface)f(for)h(recalling)e(lines)i(of)g(previously)75
|
||||
2316 y(t)o(yp)q(ed)g(input.)75 2384 y(Cop)o(yrigh)o(t)301
|
||||
2383 y(c)289 2384 y Fn(\015)f Fq(1988{2024)e(F)l(ree)i(Soft)o(w)o(are)f
|
||||
(F)l(oundation,)g(Inc.)195 2451 y(P)o(ermission)9 b(is)h(gran)o(ted)f
|
||||
(to)h(cop)o(y)l(,)h(distribute)e(and/or)h(mo)q(dify)g(this)f(do)q
|
||||
(cumen)o(t)i(under)g(the)195 2506 y(terms)h(of)g(the)h(GNU)g(F)l(ree)f
|
||||
(Do)q(cumen)o(tation)g(License,)h(V)l(ersion)g(1.3)f(or)g(an)o(y)g
|
||||
(later)g(v)o(ersion)195 2560 y(published)23 b(b)o(y)f(the)h(F)l(ree)f
|
||||
(Soft)o(w)o(are)f(F)l(oundation;)k(with)c(no)i(In)o(v)m(arian)o(t)e
|
||||
(Sections,)j(no)195 2615 y(F)l(ron)o(t-Co)o(v)o(er)13
|
||||
b(T)l(exts,)h(and)g(no)h(Bac)o(k-Co)o(v)o(er)e(T)l(exts.)20
|
||||
b(A)14 b(cop)o(y)g(of)g(the)h(license)f(is)g(included)195
|
||||
2670 y(in)h(the)g(section)g(en)o(titled)f(\\GNU)h(F)l(ree)g(Do)q(cumen)
|
||||
o(tation)g(License".)p eop end
|
||||
%%Page: -1 3
|
||||
TeXDict begin -1 2 bop 1862 -58 a Fq(i)75 149 y Fm(T)-7
|
||||
b(able)28 b(of)e(Con)n(ten)n(ts)p eop end
|
||||
@@ -5406,11 +5407,11 @@ b(F)l(or)11 b(the)h(shell,)g(and)h(man)o(y)e(other,)h(applications,)f
|
||||
(this)h(is)g(the)g(command)315 2135 y(w)o(ord.)75 2214
|
||||
y Fi(n)216 b Fq(The)15 b Fk(n)p Fq(th)h(w)o(ord.)75 2293
|
||||
y Fp(^)216 b Fq(The)15 b(\014rst)g(argumen)o(t:)k(w)o(ord)c(1.)75
|
||||
2372 y Fp($)216 b Fq(The)14 b(last)f(w)o(ord.)18 b(This)13
|
||||
b(is)h(usually)f(the)g(last)g(argumen)o(t,)g(but)h(will)e(expand)i(to)f
|
||||
(the)h(zeroth)315 2427 y(w)o(ord)h(if)f(there)h(is)g(only)g(one)g(w)o
|
||||
(ord)g(in)g(the)g(line.)75 2506 y Fp(\045)216 b Fq(The)21
|
||||
b(\014rst)f(w)o(ord)g(matc)o(hed)g(b)o(y)g(the)h(most)e(recen)o(t)i(`)p
|
||||
2372 y Fp($)216 b Fq(The)19 b(last)e(w)o(ord.)28 b(This)18
|
||||
b(is)g(usually)g(the)g(last)g(argumen)o(t,)g(but)g(expands)h(to)f(the)g
|
||||
(zeroth)315 2427 y(w)o(ord)d(if)f(there)h(is)g(only)g(one)g(w)o(ord)g
|
||||
(in)g(the)g(line.)75 2506 y Fp(\045)216 b Fq(The)21 b(\014rst)f(w)o
|
||||
(ord)g(matc)o(hed)g(b)o(y)g(the)h(most)e(recen)o(t)i(`)p
|
||||
Fp(?)p Fi(string)p Fp(?)p Fq(')d(searc)o(h,)k(if)e(the)g(searc)o(h)315
|
||||
2560 y(string)12 b(b)q(egins)h(with)f(a)g(c)o(haracter)g(that)g(is)g
|
||||
(part)h(of)f(a)g(w)o(ord.)19 b(By)13 b(default,)f(searc)o(hes)h(b)q
|
||||
@@ -5455,15 +5456,15 @@ y Fp(r)216 b Fq(Remo)o(v)o(e)15 b(a)g(trailing)e(su\016x)i(of)g(the)g
|
||||
Fp(/)p Fi(new)p Fp(/)315 1503 y Fq(Substitute)g Fk(new)k
|
||||
Fq(for)15 b(the)h(\014rst)f(o)q(ccurrence)i(of)f Fk(old)h
|
||||
Fq(in)f(the)g(ev)o(en)o(t)f(line.)22 b(An)o(y)16 b(c)o(haracter)315
|
||||
1558 y(ma)o(y)c(b)q(e)h(used)f(as)g(the)h(delimiter)e(in)h(place)g(of)g
|
||||
(`)p Fp(/)p Fq('.)18 b(The)12 b(delimiter)g(ma)o(y)f(b)q(e)i(quoted)f
|
||||
(in)h Fk(old)315 1613 y Fq(and)i Fk(new)20 b Fq(with)15
|
||||
b(a)g(single)f(bac)o(kslash.)20 b(If)15 b(`)p Fp(&)p
|
||||
Fq(')g(app)q(ears)g(in)g Fk(new)p Fq(,)g(it)g(is)g(replaced)g(with)g
|
||||
Fk(old)p Fq(.)315 1667 y(A)h(single)g(bac)o(kslash)g(will)f(quote)h
|
||||
(the)h(`)p Fp(&)p Fq(')e(in)h Fk(old)i Fq(and)f Fk(new)p
|
||||
Fq(.)24 b(If)16 b Fk(old)i Fq(is)e(n)o(ull,)g(it)f(is)h(set)h(to)315
|
||||
1722 y(the)e(last)e Fk(old)j Fq(substituted,)e(or,)g(if)g(no)h
|
||||
1558 y(ma)o(y)g(b)q(e)i(used)g(as)f(the)g(delimiter)f(in)h(place)g(of)g
|
||||
(`)p Fp(/)p Fq('.)24 b(The)18 b(delimiter)e(ma)o(y)g(b)q(e)i(quoted)f
|
||||
(in)315 1613 y Fk(old)g Fq(and)f Fk(new)k Fq(with)c(a)f(single)h(bac)o
|
||||
(kslash.)21 b(If)16 b(`)p Fp(&)p Fq(')f(app)q(ears)h(in)g
|
||||
Fk(new)p Fq(,)g(it)f(is)g(replaced)i(with)315 1667 y
|
||||
Fk(old)p Fq(.)i(A)d(single)e(bac)o(kslash)h(quotes)f(the)i(`)p
|
||||
Fp(&)p Fq(')e(in)h Fk(old)h Fq(and)g Fk(new)p Fq(.)k(If)15
|
||||
b Fk(old)i Fq(is)d(n)o(ull,)h(it)f(is)h(set)g(to)315
|
||||
1722 y(the)g(last)e Fk(old)j Fq(substituted,)e(or,)g(if)g(no)h
|
||||
(previous)f(history)g(substitutions)g(to)q(ok)g(place,)g(the)315
|
||||
1777 y(last)f Fk(string)k Fq(in)d(a)g(!?)p Fk(string)t
|
||||
Fp([?])f Fq(searc)o(h.)19 b(If)c Fk(new)j Fq(is)c(n)o(ull,)f(eac)o(h)h
|
||||
@@ -5876,12 +5877,12 @@ Fk(history)p 1350 1490 V 19 w(commen)o(t)p 1550 1490
|
||||
V 19 w(c)o(har)j Fq(to)c(delimit)195 1544 y(timestamp)g(en)o(tries)g
|
||||
(in)h(the)h(history)e(\014le.)38 b(If)21 b(that)f(v)m(ariable)h(do)q
|
||||
(es)g(not)g(ha)o(v)o(e)g(a)g(v)m(alue)g(\(the)195 1599
|
||||
y(default\),)14 b(this)h(will)f(not)g(write)h(timestamps.)1685
|
||||
1693 y([V)l(ariable])-1801 b Fh(char)27 b(history_expansion_char)195
|
||||
1748 y Fq(The)18 b(c)o(haracter)f(that)g(in)o(tro)q(duces)g(a)g
|
||||
(history)g(ev)o(en)o(t.)27 b(The)18 b(default)f(is)g(`)p
|
||||
Fp(!)p Fq('.)26 b(Setting)17 b(this)g(to)g(0)195 1802
|
||||
y(inhibits)d(history)h(expansion.)1685 1896 y([V)l(ariable])-1801
|
||||
y(default\),)14 b(the)h(history)g(library)e(will)h(not)h(write)f
|
||||
(timestamps.)1685 1693 y([V)l(ariable])-1801 b Fh(char)27
|
||||
b(history_expansion_char)195 1748 y Fq(The)18 b(c)o(haracter)f(that)g
|
||||
(in)o(tro)q(duces)g(a)g(history)g(ev)o(en)o(t.)27 b(The)18
|
||||
b(default)f(is)g(`)p Fp(!)p Fq('.)26 b(Setting)17 b(this)g(to)g(0)195
|
||||
1802 y(inhibits)d(history)h(expansion.)1685 1896 y([V)l(ariable])-1801
|
||||
b Fh(char)27 b(history_subst_char)195 1951 y Fq(The)21
|
||||
b(c)o(haracter)e(that)h(in)o(v)o(ok)o(es)f(w)o(ord)h(substitution)f(if)
|
||||
h(found)g(at)g(the)h(start)e(of)h(a)g(line.)35 b(The)195
|
||||
@@ -5912,100 +5913,98 @@ Fq(The)15 b(list)f(of)g(c)o(haracters)g(whic)o(h)h(inhibit)f(history)g
|
||||
259 y Fk(history)p 337 259 14 2 v 19 w(expansion)p 552
|
||||
259 V 20 w(c)o(har)p Fq(.)20 b(The)15 b(default)g(is)f(space,)i(tab,)e
|
||||
(newline,)h(carriage)f(return,)g(and)i(`)p Fp(=)p Fq('.)1685
|
||||
356 y([V)l(ariable])-1801 b Fh(int)27 b(history_quotes_inhibit_exp)q
|
||||
(ansion)195 411 y Fq(If)17 b(non-zero,)g(the)g(history)f(expansion)h
|
||||
348 y([V)l(ariable])-1801 b Fh(int)27 b(history_quotes_inhibit_exp)q
|
||||
(ansion)195 403 y Fq(If)17 b(non-zero,)g(the)g(history)f(expansion)h
|
||||
(co)q(de)g(implemen)o(ts)f(shell-lik)o(e)g(quoting:)22
|
||||
b(single-quoted)195 466 y(w)o(ords)c(are)g(not)h(scanned)g(for)f(the)h
|
||||
b(single-quoted)195 458 y(w)o(ords)c(are)g(not)h(scanned)g(for)f(the)h
|
||||
(history)f(expansion)h(c)o(haracter)f(or)g(the)h(history)e(commen)o(t)
|
||||
195 520 y(c)o(haracter,)22 b(and)g(double-quoted)g(w)o(ords)e(ma)o(y)h
|
||||
195 513 y(c)o(haracter,)22 b(and)g(double-quoted)g(w)o(ords)e(ma)o(y)h
|
||||
(ha)o(v)o(e)g(history)g(expansion)g(p)q(erformed,)i(since)195
|
||||
575 y(single)15 b(quotes)f(are)h(not)g(sp)q(ecial)g(within)g(double)g
|
||||
567 y(single)15 b(quotes)f(are)h(not)g(sp)q(ecial)g(within)g(double)g
|
||||
(quotes.)20 b(The)15 b(default)g(v)m(alue)g(is)g(0.)1685
|
||||
672 y([V)l(ariable])-1801 b Fh(int)27 b(history_quoting_state)195
|
||||
727 y Fq(An)14 b(application)f(ma)o(y)g(set)h(this)f(v)m(ariable)g(to)h
|
||||
656 y([V)l(ariable])-1801 b Fh(int)27 b(history_quoting_state)195
|
||||
711 y Fq(An)14 b(application)f(ma)o(y)g(set)h(this)f(v)m(ariable)g(to)h
|
||||
(indicate)f(that)g(the)h(curren)o(t)g(line)g(b)q(eing)g(expanded)195
|
||||
782 y(is)f(sub)s(ject)g(to)f(existing)g(quoting.)18 b(If)c(set)f(to)f
|
||||
(`)p Fp(')p Fq(',)g(the)h(history)f(expansion)h(function)g(will)f
|
||||
(assume)195 836 y(that)h(the)h(line)f(is)g(single-quoted)g(and)h
|
||||
(inhibit)f(expansion)g(un)o(til)g(it)g(reads)g(an)h(unquoted)g(closing)
|
||||
195 891 y(single)19 b(quote;)j(if)e(set)g(to)f(`)p Fp(")p
|
||||
Fq(',)h(history)f(expansion)h(will)f(assume)h(the)g(line)g(is)g(double)
|
||||
g(quoted)195 946 y(un)o(til)c(it)f(reads)i(an)f(unquoted)h(closing)f
|
||||
(double)h(quote.)24 b(If)16 b(set)h(to)e(0,)i(the)f(default,)g(the)h
|
||||
(history)195 1001 y(expansion)10 b(function)h(will)e(assume)i(the)f
|
||||
(line)g(is)g(not)h(quoted)f(and)h(treat)f(quote)g(c)o(haracters)g
|
||||
(within)195 1056 y(the)15 b(line)f(as)g(describ)q(ed)h(ab)q(o)o(v)o(e.)
|
||||
k(This)14 b(is)g(only)g(e\013ectiv)o(e)g(if)g Fk(history)p
|
||||
1364 1056 V 19 w(quotes)p 1511 1056 V 20 w(inhibit)p
|
||||
1663 1056 V 19 w(expansion)195 1110 y Fq(is)i(set.)23
|
||||
b(This)16 b(is)g(in)o(tended)h(for)f(use)h(b)o(y)f(applications)f(lik)o
|
||||
(e)h(Bash)h(whic)o(h)f(allo)o(w)f(quoted)h(strings)195
|
||||
1165 y(to)f(span)g(m)o(ultiple)f(lines.)1685 1262 y([V)l(ariable])-1801
|
||||
b Fh(rl_linebuf_func_t)29 b(*)d(history_inhibit_expansi)q(on_func)q
|
||||
(tion)195 1317 y Fq(This)16 b(should)h(b)q(e)g(set)g(to)f(the)g
|
||||
(address)h(of)f(a)h(function)f(that)g(tak)o(es)g(t)o(w)o(o)f(argumen)o
|
||||
(ts:)22 b(a)17 b Fp(char)d(*)195 1372 y Fq(\()p Fk(string)t
|
||||
Fq(\))d(and)j(an)f Fp(int)g Fq(index)h(in)o(to)e(that)g(string)h(\()p
|
||||
Fk(i)r Fq(\).)18 b(It)c(should)f(return)g(a)g(non-zero)h(v)m(alue)f(if)
|
||||
g(the)195 1427 y(history)h(expansion)g(starting)f(at)h
|
||||
Fk(string[i])g Fq(should)h(not)f(b)q(e)h(p)q(erformed;)g(zero)f(if)g
|
||||
(the)h(expansion)195 1481 y(should)h(b)q(e)h(done.)22
|
||||
b(It)16 b(is)g(in)o(tended)g(for)f(use)i(b)o(y)f(applications)e(lik)o
|
||||
(e)h(Bash)h(that)g(use)g(the)g(history)195 1536 y(expansion)f(c)o
|
||||
(haracter)g(for)f(additional)g(purp)q(oses.)20 b(By)c(default,)e(this)h
|
||||
(v)m(ariable)f(is)h(set)g(to)f Fp(NULL)p Fq(.)75 1660
|
||||
y Fo(2.5)33 b(History)21 b(Programming)h(Example)75 1740
|
||||
y Fq(The)15 b(follo)o(wing)e(program)h(demonstrates)h(simple)g(use)g
|
||||
(of)g(the)g Fl(gnu)g Fq(History)f(Library)l(.)195 1798
|
||||
y Fe(#include)j(<stdio.h)o(>)195 1842 y(#include)g(<readlin)o(e/h)o(is)
|
||||
o(tor)o(y.h)o(>)195 1929 y(int)195 1973 y(main)h(\(int)g(argc,)g(char)g
|
||||
(**argv\))195 2016 y({)234 2060 y(char)g(line[1024])o(,)f(*t;)234
|
||||
2103 y(int)i(len,)f(done)g(=)h(0;)234 2191 y(line[0])e(=)i(0;)234
|
||||
2278 y(using_hist)o(ory)d(\(\);)234 2321 y(while)i(\(!done\))273
|
||||
2365 y({)313 2408 y(printf)f(\("history)o($)g("\);)313
|
||||
2452 y(fflush)g(\(stdout\);)313 2496 y(t)i(=)g(fgets)f(\(line,)f
|
||||
(sizeof)g(\(line\))h(-)h(1,)g(stdin\);)313 2539 y(if)g(\(t)f(&&)h(*t\))
|
||||
352 2583 y({)391 2626 y(len)g(=)g(strlen)e(\(t\);)391
|
||||
2670 y(if)i(\(t[len)e(-)i(1])g(==)g('\\n'\))p eop end
|
||||
766 y(is)g(sub)s(ject)g(to)g(existing)f(quoting.)19 b(If)c(set)f(to)f
|
||||
(`)p Fp(')p Fq(',)h(history)f(expansion)h(assumes)g(that)g(the)g(line)g
|
||||
(is)195 821 y(single-quoted)j(and)g(inhibit)g(expansion)g(un)o(til)g
|
||||
(it)f(reads)h(an)h(unquoted)g(closing)e(single)h(quote;)195
|
||||
876 y(if)i(set)h(to)f(`)p Fp(")p Fq(',)g(history)g(expansion)h(assumes)
|
||||
f(the)h(line)f(is)h(double)g(quoted)g(un)o(til)e(it)h(reads)h(an)195
|
||||
930 y(unquoted)f(closing)f(double)h(quote.)30 b(If)19
|
||||
b(set)f(to)h(0,)f(the)h(default,)g(history)f(expansion)g(assumes)195
|
||||
985 y(the)d(line)f(is)g(not)g(quoted)h(and)g(treats)e(quote)i(c)o
|
||||
(haracters)e(within)h(the)h(line)f(as)g(describ)q(ed)i(ab)q(o)o(v)o(e.)
|
||||
195 1040 y(This)g(is)h(only)f(e\013ectiv)o(e)g(if)h Fk(history)p
|
||||
812 1040 V 19 w(quotes)p 959 1040 V 19 w(inhibit)p 1110
|
||||
1040 V 20 w(expansion)g Fq(is)f(set.)25 b(This)16 b(is)g(in)o(tended)i
|
||||
(for)195 1095 y(use)e(b)o(y)f(applications)e(lik)o(e)i(Bash)g(whic)o(h)
|
||||
g(allo)o(w)f(quoted)h(strings)f(to)g(span)i(m)o(ultiple)e(lines.)1685
|
||||
1184 y([V)l(ariable])-1801 b Fh(rl_linebuf_func_t)29
|
||||
b(*)d(history_inhibit_expansi)q(on_func)q(tion)195 1239
|
||||
y Fq(This)16 b(should)h(b)q(e)g(set)g(to)f(the)g(address)h(of)f(a)h
|
||||
(function)f(that)g(tak)o(es)g(t)o(w)o(o)f(argumen)o(ts:)22
|
||||
b(a)17 b Fp(char)d(*)195 1294 y Fq(\()p Fk(string)t Fq(\))d(and)j(an)f
|
||||
Fp(int)g Fq(index)h(in)o(to)e(that)g(string)h(\()p Fk(i)r
|
||||
Fq(\).)18 b(It)c(should)f(return)g(a)g(non-zero)h(v)m(alue)f(if)g(the)
|
||||
195 1348 y(history)h(expansion)g(starting)f(at)h Fk(string[i])g
|
||||
Fq(should)h(not)f(b)q(e)h(p)q(erformed;)g(zero)f(if)g(the)h(expansion)
|
||||
195 1403 y(should)h(b)q(e)h(done.)22 b(It)16 b(is)g(in)o(tended)g(for)f
|
||||
(use)i(b)o(y)f(applications)e(lik)o(e)h(Bash)h(that)g(use)g(the)g
|
||||
(history)195 1458 y(expansion)f(c)o(haracter)g(for)f(additional)g(purp)
|
||||
q(oses.)20 b(By)c(default,)e(this)h(v)m(ariable)f(is)h(set)g(to)f
|
||||
Fp(NULL)p Fq(.)75 1576 y Fo(2.5)33 b(History)21 b(Programming)h
|
||||
(Example)75 1656 y Fq(The)15 b(follo)o(wing)e(program)h(demonstrates)h
|
||||
(simple)g(use)g(of)g(the)g Fl(gnu)g Fq(History)f(Library)l(.)195
|
||||
1711 y Fe(#include)j(<stdio.h)o(>)195 1755 y(#include)g(<readlin)o(e/h)
|
||||
o(is)o(tor)o(y.h)o(>)195 1842 y(int)195 1885 y(main)h(\(int)g(argc,)g
|
||||
(char)g(**argv\))195 1929 y({)234 1973 y(char)g(line[1024])o(,)f(*t;)
|
||||
234 2016 y(int)i(len,)f(done)g(=)h(0;)234 2103 y(line[0])e(=)i(0;)234
|
||||
2191 y(using_hist)o(ory)d(\(\);)234 2234 y(while)i(\(!done\))273
|
||||
2278 y({)313 2321 y(printf)f(\("history)o($)g("\);)313
|
||||
2365 y(fflush)g(\(stdout\);)313 2408 y(t)i(=)g(fgets)f(\(line,)f
|
||||
(sizeof)g(\(line\))h(-)h(1,)g(stdin\);)313 2452 y(if)g(\(t)f(&&)h(*t\))
|
||||
352 2496 y({)391 2539 y(len)g(=)g(strlen)e(\(t\);)391
|
||||
2583 y(if)i(\(t[len)e(-)i(1])g(==)g('\\n'\))430 2626
|
||||
y(t[len)f(-)h(1])g(=)g('\\0';)352 2670 y(})p eop end
|
||||
%%Page: 11 14
|
||||
TeXDict begin 11 13 bop 75 -58 a Fq(Chapter)15 b(2:)k(Programming)14
|
||||
b(with)g(GNU)h(History)866 b(11)430 149 y Fe(t[len)18
|
||||
b(-)h(1])g(=)g('\\0';)352 193 y(})313 280 y(if)g(\(!t\))352
|
||||
324 y(strcpy)e(\(line,)g("quit"\);)313 411 y(if)i(\(line[0])o(\))352
|
||||
455 y({)391 498 y(char)f(*expansion)o(;)391 542 y(int)h(result;)391
|
||||
629 y(result)e(=)j(history_e)o(xp)o(and)c(\(line,)h(&expansion)o(\);)
|
||||
391 672 y(if)i(\(result\))430 716 y(fprintf)e(\(stderr,)g("\045s\\n",)g
|
||||
(expansion)o(\);)391 803 y(if)i(\(result)e(<)i(0)g(||)g(result)e(==)i
|
||||
(2\))430 847 y({)470 890 y(free)f(\(expansio)o(n\))o(;)470
|
||||
934 y(continue)o(;)430 978 y(})391 1065 y(add_histor)o(y)e
|
||||
(\(expansion\))o(;)391 1108 y(strncpy)h(\(line,)g(expansion,)f(sizeof)h
|
||||
(\(line\))h(-)h(1\);)391 1152 y(free)f(\(expansion)o(\);)352
|
||||
1196 y(})313 1283 y(if)h(\(strcmp)d(\(line,)i("quit"\))f(==)h(0\))352
|
||||
1326 y(done)g(=)h(1;)313 1370 y(else)f(if)h(\(strcmp)d(\(line,)i
|
||||
("save"\))f(==)i(0\))352 1413 y(write_his)o(tor)o(y)d(\("history_f)o
|
||||
(il)o(e"\))o(;)313 1457 y(else)i(if)h(\(strcmp)d(\(line,)i("read"\))f
|
||||
(==)i(0\))352 1501 y(read_hist)o(ory)d(\("history)o(_fi)o(le)o("\);)313
|
||||
1544 y(else)i(if)h(\(strcmp)d(\(line,)i("list"\))f(==)i(0\))352
|
||||
1588 y({)391 1631 y(register)e(HIST_ENTR)o(Y)f(**the_list;)391
|
||||
1675 y(register)h(int)h(i;)391 1762 y(the_list)f(=)i(history_l)o(ist)d
|
||||
(\(\);)391 1806 y(if)j(\(the_list)o(\))430 1849 y(for)g(\(i)g(=)g(0;)g
|
||||
(the_list[)o(i])o(;)e(i++\))470 1893 y(printf)g(\("\045d:)h(\045s\\n",)
|
||||
b(with)g(GNU)h(History)866 b(11)313 193 y Fe(if)19 b(\(!t\))352
|
||||
237 y(strcpy)e(\(line,)g("quit"\);)313 324 y(if)i(\(line[0])o(\))352
|
||||
367 y({)391 411 y(char)f(*expansion)o(;)391 455 y(int)h(result;)391
|
||||
542 y(result)e(=)j(history_e)o(xp)o(and)c(\(line,)h(&expansion)o(\);)
|
||||
391 585 y(if)i(\(result\))430 629 y(fprintf)e(\(stderr,)g("\045s\\n",)g
|
||||
(expansion)o(\);)391 716 y(if)i(\(result)e(<)i(0)g(||)g(result)e(==)i
|
||||
(2\))430 760 y({)470 803 y(free)f(\(expansio)o(n\))o(;)470
|
||||
847 y(continue)o(;)430 890 y(})391 978 y(add_histor)o(y)e
|
||||
(\(expansion\))o(;)391 1021 y(strncpy)h(\(line,)g(expansion,)f(sizeof)h
|
||||
(\(line\))h(-)h(1\);)391 1065 y(free)f(\(expansion)o(\);)352
|
||||
1108 y(})313 1196 y(if)h(\(strcmp)d(\(line,)i("quit"\))f(==)h(0\))352
|
||||
1239 y(done)g(=)h(1;)313 1283 y(else)f(if)h(\(strcmp)d(\(line,)i
|
||||
("save"\))f(==)i(0\))352 1326 y(write_his)o(tor)o(y)d(\("history_f)o
|
||||
(il)o(e"\))o(;)313 1370 y(else)i(if)h(\(strcmp)d(\(line,)i("read"\))f
|
||||
(==)i(0\))352 1413 y(read_hist)o(ory)d(\("history)o(_fi)o(le)o("\);)313
|
||||
1457 y(else)i(if)h(\(strcmp)d(\(line,)i("list"\))f(==)i(0\))352
|
||||
1501 y({)391 1544 y(register)e(HIST_ENTR)o(Y)f(**the_list;)391
|
||||
1588 y(register)h(int)h(i;)391 1675 y(the_list)f(=)i(history_l)o(ist)d
|
||||
(\(\);)391 1719 y(if)j(\(the_list)o(\))430 1762 y(for)g(\(i)g(=)g(0;)g
|
||||
(the_list[)o(i])o(;)e(i++\))470 1806 y(printf)g(\("\045d:)h(\045s\\n",)
|
||||
f(i)i(+)g(history_ba)o(se,)d(the_list[)o(i]-)o(>li)o(ne)o(\);)352
|
||||
1936 y(})313 1980 y(else)i(if)h(\(strncmp)d(\(line,)h("delete",)g(6\))h
|
||||
(==)h(0\))352 2024 y({)391 2067 y(int)g(which;)391 2111
|
||||
1849 y(})313 1893 y(else)i(if)h(\(strncmp)d(\(line,)h("delete",)g(6\))h
|
||||
(==)h(0\))352 1936 y({)391 1980 y(int)g(which;)391 2024
|
||||
y(if)g(\(\(sscanf)d(\(line)i(+)h(6,)g("\045d",)f(&which\)\))e(==)j(1\))
|
||||
430 2154 y({)470 2198 y(HIST_ENT)o(RY)d(*entry)i(=)h(remove_hi)o(sto)o
|
||||
(ry)d(\(which\);)470 2242 y(if)i(\(!entry\))509 2285
|
||||
430 2067 y({)470 2111 y(HIST_ENT)o(RY)d(*entry)i(=)h(remove_hi)o(sto)o
|
||||
(ry)d(\(which\);)470 2154 y(if)i(\(!entry\))509 2198
|
||||
y(fprintf)f(\(stderr,)f("No)j(such)f(entry)f(\045d\\n",)h(which\);)470
|
||||
2329 y(else)509 2372 y({)548 2416 y(free)g(\(entry->li)o(ne)o(\);)548
|
||||
2460 y(free)g(\(entry\);)509 2503 y(})430 2547 y(})391
|
||||
2590 y(else)430 2634 y({)p eop end
|
||||
2242 y(else)509 2285 y({)548 2329 y(free)g(\(entry->li)o(ne)o(\);)548
|
||||
2372 y(free)g(\(entry\);)509 2416 y(})430 2460 y(})391
|
||||
2503 y(else)430 2547 y({)470 2590 y(fprintf)e(\(stderr,)h("non-numer)o
|
||||
(ic)f(arg)i(given)g(to)h(`delete'\\n)o("\))o(;)430 2634
|
||||
y(})p eop end
|
||||
%%Page: 12 15
|
||||
TeXDict begin 12 14 bop 75 -58 a Fq(Chapter)15 b(2:)k(Programming)14
|
||||
b(with)g(GNU)h(History)866 b(12)470 149 y Fe(fprintf)16
|
||||
b(\(stderr,)h("non-numer)o(ic)f(arg)i(given)g(to)h(`delete'\\n)o("\))o
|
||||
(;)430 193 y(})352 237 y(})273 280 y(})195 324 y(})p
|
||||
eop end
|
||||
b(with)g(GNU)h(History)866 b(12)352 149 y Fe(})273 193
|
||||
y(})195 237 y(})p eop end
|
||||
%%Page: 13 16
|
||||
TeXDict begin 13 15 bop 1830 -58 a Fq(13)75 149 y Fm(App)r(endix)26
|
||||
b(A)41 b(GNU)27 b(F)-7 b(ree)26 b(Do)r(cumen)n(tation)j(License)679
|
||||
|
||||
Binary file not shown.
@@ -470,8 +470,8 @@ The default value is 0, meaning that timestamps are not saved.
|
||||
|
||||
The current timestamp format uses the value of @var{history_comment_char}
|
||||
to delimit timestamp entries in the history file.
|
||||
If that variable does not have a value (the default), this will not
|
||||
write timestamps.
|
||||
If that variable does not have a value (the default),
|
||||
the history library will not write timestamps.
|
||||
@end deftypevar
|
||||
|
||||
@deftypevar char history_expansion_char
|
||||
@@ -523,14 +523,15 @@ The default value is 0.
|
||||
@deftypevar int history_quoting_state
|
||||
An application may set this variable to indicate that the current line
|
||||
being expanded is subject to existing quoting.
|
||||
If set to @samp{'}, the
|
||||
history expansion function will assume that the line is single-quoted and
|
||||
If set to @samp{'},
|
||||
history expansion assumes that the line is single-quoted and
|
||||
inhibit expansion until it reads an unquoted closing single quote;
|
||||
if set to @samp{"}, history expansion will assume the line is
|
||||
double quoted until it reads an unquoted closing double quote.
|
||||
if set to @samp{"},
|
||||
history expansion assumes the line is double quoted
|
||||
until it reads an unquoted closing double quote.
|
||||
If set to 0, the default,
|
||||
the history expansion function will assume the line is not quoted and
|
||||
treat quote characters within the line as described above.
|
||||
history expansion assumes the line is not quoted and
|
||||
treats quote characters within the line as described above.
|
||||
This is only effective if @var{history_quotes_inhibit_expansion} is set.
|
||||
This is intended for use by applications like Bash which allow
|
||||
quoted strings to span multiple lines.
|
||||
|
||||
@@ -401,7 +401,7 @@ expansion character.
|
||||
@ifset BashFeatures
|
||||
Several shell options settable with the @code{shopt}
|
||||
builtin (@pxref{The Shopt Builtin})
|
||||
will modify history expansion behavior
|
||||
modify history expansion behavior
|
||||
If the @code{histverify} shell option is enabled, and Readline
|
||||
is being used, history substitutions are not immediately passed to
|
||||
the shell parser.
|
||||
@@ -540,7 +540,7 @@ The first argument: word 1.
|
||||
|
||||
@item $
|
||||
The last word.
|
||||
This is usually the last argument, but will expand to the
|
||||
This is usually the last argument, but expands to the
|
||||
zeroth word if there is only one word in the line.
|
||||
|
||||
@item %
|
||||
@@ -614,7 +614,7 @@ Any character may be used as the delimiter in place of @samp{/}.
|
||||
The delimiter may be quoted in @var{old} and @var{new}
|
||||
with a single backslash.
|
||||
If @samp{&} appears in @var{new}, it is replaced with @var{old}.
|
||||
A single backslash will quote the @samp{&} in @var{old} and @var{new}.
|
||||
A single backslash quotes the @samp{&} in @var{old} and @var{new}.
|
||||
If @var{old} is null, it is set to the last @var{old}
|
||||
substituted, or, if no previous history substitutions took place,
|
||||
the last @var{string}
|
||||
|
||||
+369
-366
File diff suppressed because it is too large
Load Diff
+86
-68
@@ -6,9 +6,9 @@
|
||||
.\" Case Western Reserve University
|
||||
.\" chet.ramey@case.edu
|
||||
.\"
|
||||
.\" Last Change: Fri Nov 15 17:57:09 EST 2024
|
||||
.\" Last Change: Fri Nov 29 18:17:27 EST 2024
|
||||
.\"
|
||||
.TH READLINE 3 "2024 November 15" "GNU Readline 8.3"
|
||||
.TH READLINE 3 "2024 November 29" "GNU Readline 8.3"
|
||||
.\"
|
||||
.ie \n(.g \{\
|
||||
.ds ' \(aq
|
||||
@@ -18,7 +18,7 @@
|
||||
.\}
|
||||
.el \{\
|
||||
.ds ' '
|
||||
.\" not usable in macro arguments on AT&T troff (DWB, Solaris 10)
|
||||
.\" \*" is not usable in macro arguments on AT&T troff (DWB, Solaris 10)
|
||||
.ds " ""\" two adjacent quotes and no space before this comment
|
||||
.ds ^ ^
|
||||
.ds ~ ~
|
||||
@@ -26,10 +26,15 @@
|
||||
.
|
||||
.\" File Name macro. This used to be `.PN', for Path Name,
|
||||
.\" but Sun doesn't seem to like that very much.
|
||||
.\" \% at the beginning of the string protects the filename from hyphenation.
|
||||
.\"
|
||||
.de FN
|
||||
\%\fI\|\\$1\|\fP
|
||||
..
|
||||
.\"
|
||||
.\" Quotation macro: generate consistent quoted strings that don't rely
|
||||
.\" on the presence of the `CW' constant-width font.
|
||||
.\"
|
||||
.de Q
|
||||
.ie \n(.g \(lq\\$1\(rq\\$2
|
||||
.el \{\
|
||||
@@ -60,7 +65,7 @@ readline \- get a line from a user with editing
|
||||
.SH DESCRIPTION
|
||||
.LP
|
||||
.B readline
|
||||
will read a line from the terminal
|
||||
reads a line from the terminal
|
||||
and return it, using
|
||||
.B prompt
|
||||
as a prompt.
|
||||
@@ -122,7 +127,7 @@ the Escape key, then press and release the
|
||||
.I x
|
||||
key, in sequence.
|
||||
This makes ESC the \fImeta prefix\fP.
|
||||
The combination M\-C\-\fIx\fP means ESC\-Control\-\fIx\fP:
|
||||
The combination M\-C\-\fIx\fP means ESC Control\-\fIx\fP:
|
||||
press and release the Escape key,
|
||||
then press and hold the Control key while pressing the
|
||||
.I x
|
||||
@@ -176,7 +181,7 @@ If that variable is unset, the default is
|
||||
.IR \*~/.inputrc .
|
||||
If that file does not exist or cannot be read, \fBreadline\fP looks for
|
||||
.IR /etc/inputrc .
|
||||
When a program which uses the \fBreadline\fP library starts up,
|
||||
When a program that uses the \fBreadline\fP library starts up,
|
||||
\fBreadline\fP reads the initialization file
|
||||
and sets the key bindings and variables found there,
|
||||
before reading any user input.
|
||||
@@ -217,7 +222,8 @@ Key bindings may contain the following symbolic character names:
|
||||
.IR NEWLINE ,
|
||||
.IR RET ,
|
||||
.IR RETURN ,
|
||||
.IR RUBOUT (a destructive backspace),
|
||||
.I RUBOUT
|
||||
(a destructive backspace),
|
||||
.IR SPACE ,
|
||||
.IR SPC ,
|
||||
and
|
||||
@@ -371,9 +377,9 @@ The eight-bit character whose value is the hexadecimal value \fIHH\fP
|
||||
When entering the text of a macro, single or double quotes must
|
||||
be used to indicate a macro definition.
|
||||
Unquoted text is assumed to be a function name.
|
||||
Tthe backslash escapes described above are expanded
|
||||
The backslash escapes described above are expanded
|
||||
in the macro body.
|
||||
Backslash will quote any other character in the macro text,
|
||||
Backslash quotes any other character in the macro text,
|
||||
including \*" and \*'.
|
||||
.PP
|
||||
.B Bash
|
||||
@@ -387,7 +393,7 @@ or
|
||||
options to the
|
||||
.B set
|
||||
builtin
|
||||
will change the editing mode during interactive use.
|
||||
change the editing mode during interactive use.
|
||||
Other programs using this library provide similar mechanisms.
|
||||
A user may always edit the
|
||||
.I inputrc
|
||||
@@ -507,7 +513,7 @@ The number of screen columns used to display possible matches
|
||||
when performing completion.
|
||||
The value is ignored if it is less than 0 or greater than the terminal
|
||||
screen width.
|
||||
A value of 0 will cause matches to be displayed one per line.
|
||||
A value of 0 causes matches to be displayed one per line.
|
||||
The default value is \-1.
|
||||
.TP
|
||||
.B completion\-ignore\-case (Off)
|
||||
@@ -535,17 +541,17 @@ generated by the \fBpossible\-completions\fP command.
|
||||
It may be set to any integer value greater than or equal to zero.
|
||||
If the number of possible completions is greater than
|
||||
or equal to the value of this variable,
|
||||
\fBreadline\fP will ask whether or not the user wishes to view them;
|
||||
\fBreadline\fP asks whether or not the user wishes to view them;
|
||||
otherwise \fBreadline\fP simply lists them on the terminal.
|
||||
A zero value means \fBreadline\fP should never ask; negative values are
|
||||
treated as zero.
|
||||
.TP
|
||||
.B convert\-meta (On)
|
||||
If set to \fBOn\fP, \fBreadline\fP will convert characters it reads
|
||||
If set to \fBOn\fP, \fBreadline\fP converts characters it reads
|
||||
that have the eighth bit set to an ASCII key sequence by
|
||||
clearing the eighth bit and prefixing it with an escape character
|
||||
(converting the character to have the meta prefix).
|
||||
The default is \fIOn\fP, but \fBreadline\fP will set it to \fIOff\fP
|
||||
The default is \fIOn\fP, but \fBreadline\fP sets it to \fIOff\fP
|
||||
if the locale contains
|
||||
characters whose encodings may include bytes with the eighth bit set.
|
||||
This variable is dependent on the \fBLC_CTYPE\fP locale category, and
|
||||
@@ -554,8 +560,8 @@ This variable also affects key bindings; see the description of
|
||||
\fBforce\-meta\-prefix\fP below.
|
||||
.TP
|
||||
.B disable\-completion (Off)
|
||||
If set to \fBOn\fP, \fBreadline\fP will inhibit word completion.
|
||||
Completion characters will be inserted into the line as if they
|
||||
If set to \fBOn\fP, \fBreadline\fP inhibits word completion.
|
||||
Completion characters are inserted into the line as if they
|
||||
had been mapped to \fBself-insert\fP.
|
||||
.TP
|
||||
.B echo\-control\-characters (On)
|
||||
@@ -586,10 +592,11 @@ sequence into the mode string.
|
||||
.B enable\-active\-region (On)
|
||||
When this variable is set to \fIOn\fP, \fBreadline\fP allows certain commands
|
||||
to designate the region as \fIactive\fP.
|
||||
When the region is active, \fBreadline\fP highlights
|
||||
the text in the region using
|
||||
the value of the \fBactive\-region\-start\-color\fP, which defaults to the
|
||||
string that enables the terminal's standout mode.
|
||||
When the region is active, \fBreadline\fP
|
||||
highlights the text in the region using the value of the
|
||||
.B active\-region\-start\-color
|
||||
variable, which defaults to the string that enables
|
||||
the terminal's standout mode.
|
||||
The active region shows the text inserted by bracketed-paste and any
|
||||
matching text found by incremental and non-incremental history searches.
|
||||
.TP
|
||||
@@ -602,12 +609,12 @@ it prevents \fBreadline\fP from executing any editing commands bound to key
|
||||
sequences appearing in the pasted text.
|
||||
.TP
|
||||
.B enable\-keypad (Off)
|
||||
When set to \fBOn\fP, \fBreadline\fP will try to enable the application
|
||||
When set to \fBOn\fP, \fBreadline\fP tries to enable the application
|
||||
keypad when it is called.
|
||||
Some systems need this to enable the arrow keys.
|
||||
.TP
|
||||
.B enable\-meta\-key (On)
|
||||
When set to \fBOn\fP, \fBreadline\fP will try to enable any meta modifier
|
||||
When set to \fBOn\fP, \fBreadline\fP tries to enable any meta modifier
|
||||
key the terminal claims to support.
|
||||
On many terminals, the Meta key is used to send eight-bit characters;
|
||||
this variable checks for the terminal capability that indicates the
|
||||
@@ -659,10 +666,10 @@ a new line.
|
||||
This setting is automatically enabled for terminals of height 1.
|
||||
.TP
|
||||
.B input\-meta (Off)
|
||||
If set to \fBOn\fP, \fBreadline\fP will enable eight-bit input (that is, it
|
||||
will not clear the eighth bit in the characters it reads),
|
||||
If set to \fBOn\fP, \fBreadline\fP enables eight-bit input (that is, it
|
||||
does not clear the eighth bit in the characters it reads),
|
||||
regardless of what the terminal claims it can support.
|
||||
The default is \fIOff\fP, but \fBreadline\fP will set it to \fIOn\fP
|
||||
The default is \fIOff\fP, but \fBreadline\fP sets it to \fIOn\fP
|
||||
if the locale contains characters whose encodings may include bytes
|
||||
with the eighth bit set.
|
||||
This variable is dependent on the \fBLC_CTYPE\fP locale category, and
|
||||
@@ -670,11 +677,11 @@ its value may change if the locale changes.
|
||||
The name \fBmeta\-flag\fP is a synonym for \fBinput\-meta\fP.
|
||||
.TP
|
||||
.BR isearch\-terminators\ ( \c
|
||||
.Q \fBC\-[C\-J\fP \fB)\fP
|
||||
.Q \fBC\-[C\-j\fP \fB)\fP
|
||||
The string of characters that should terminate an incremental
|
||||
search without subsequently executing the character as a command.
|
||||
If this variable has not been given a value, the characters
|
||||
\fIESC\fP and \fIC\-J\fP will terminate an incremental search.
|
||||
\fIESC\fP and \fBC\-j\fP terminate an incremental search.
|
||||
.TP
|
||||
.B keymap (emacs)
|
||||
Set the current \fBreadline\fP keymap.
|
||||
@@ -695,11 +702,11 @@ reading an ambiguous key sequence
|
||||
(one that can form a complete key sequence using the input read so far,
|
||||
or can take additional input to complete a longer key sequence).
|
||||
If \fBreadline\fP does not receive any input within the timeout,
|
||||
it will use the shorter but complete key sequence.
|
||||
it uses the shorter but complete key sequence.
|
||||
The value is specified in milliseconds, so a value of 1000 means that
|
||||
\fBreadline\fP will wait one second for additional input.
|
||||
If this variable is set to a value less than or equal to zero, or to a
|
||||
non-numeric value, \fBreadline\fP will wait until another key is pressed to
|
||||
non-numeric value, \fBreadline\fP waits until another key is pressed to
|
||||
decide which key sequence to complete.
|
||||
.TP
|
||||
.B mark\-directories (On)
|
||||
@@ -729,24 +736,25 @@ list of possible completions (which may be empty) before cycling through
|
||||
the list.
|
||||
.TP
|
||||
.B output\-meta (Off)
|
||||
If set to \fBOn\fP, \fBreadline\fP will display characters with the
|
||||
If set to \fBOn\fP, \fBreadline\fP displays characters with the
|
||||
eighth bit set directly rather than as a meta-prefixed escape
|
||||
sequence.
|
||||
The default is \fIOff\fP, but \fBreadline\fP will set it to \fIOn\fP
|
||||
The default is \fIOff\fP, but \fBreadline\fP sets it to \fIOn\fP
|
||||
if the locale contains characters whose encodings may include
|
||||
bytes with the eighth bit set.
|
||||
This variable is dependent on the \fBLC_CTYPE\fP locale category, and
|
||||
its value may change if the locale changes.
|
||||
.TP
|
||||
.B page\-completions (On)
|
||||
If set to \fBOn\fP, \fBreadline\fP uses an internal \fImore\fP-like pager
|
||||
If set to \fBOn\fP, \fBreadline\fP uses an internal pager resembling
|
||||
.IR more (1)
|
||||
to display a screenful of possible completions at a time.
|
||||
.TP
|
||||
.B prefer\-visible\-bell
|
||||
See \fBbell\-style\fP.
|
||||
.TP
|
||||
.B print\-completions\-horizontally (Off)
|
||||
If set to \fBOn\fP, \fBreadline\fP will display completions with matches
|
||||
If set to \fBOn\fP, \fBreadline\fP displays completions with matches
|
||||
sorted horizontally in alphabetical order, rather than down the screen.
|
||||
.TP
|
||||
.B revert\-all\-at\-newline (Off)
|
||||
@@ -953,18 +961,18 @@ Typing \fBC\-s\fP searches forward through the history.
|
||||
The characters present in the value of the \fBisearch-terminators\fP
|
||||
variable are used to terminate an incremental search.
|
||||
If that variable has not been assigned a value,
|
||||
\fIESC\fP and \fIC\-J\fP will terminate an incremental search.
|
||||
\fIC\-g\fP will abort an incremental search and restore the original line.
|
||||
\fIESC\fP and \fBC\-j\fP terminate an incremental search.
|
||||
\fBC\-g\fP aborts an incremental search and restores the original line.
|
||||
When the search is terminated, the history entry containing the
|
||||
search string becomes the current line.
|
||||
.PP
|
||||
To find other matching entries in the history list, type \fBC\-r\fP or
|
||||
\fBC\-s\fP as appropriate.
|
||||
This will search backward or forward in the history for the next
|
||||
This searches backward or forward in the history for the next
|
||||
entry matching the search string typed so far.
|
||||
Any other key sequence bound to a \fBreadline\fP command will terminate
|
||||
the search and execute that command.
|
||||
For instance, a newline will terminate the search and accept
|
||||
Any other key sequence bound to a \fBreadline\fP command terminates
|
||||
the search and executes that command.
|
||||
For instance, a newline terminates the search and accepts
|
||||
the line, thereby executing the command from the history list.
|
||||
A movement command will terminate the search, make the last line found
|
||||
the current line, and begin editing.
|
||||
@@ -990,8 +998,9 @@ The text between the point and mark is referred to as the \fIregion\fP.
|
||||
.B Readline
|
||||
has the concept of an \fIactive region\fP:
|
||||
when the region is active, \fBreadline\fP redisplay
|
||||
highlights the region using the
|
||||
value of the \fBactive-region-start-color\fP variable.
|
||||
highlights the region using the value of the
|
||||
.B active\-region\-start\-color
|
||||
variable.
|
||||
The \fBenable\-active\-region\fP variable turns this on and off.
|
||||
Several commands set the region to active; those are noted below.
|
||||
.SS Commands for Moving
|
||||
@@ -1007,6 +1016,7 @@ This may also be bound to the End key on some keyboards.
|
||||
.TP
|
||||
.B forward\-char (C\-f)
|
||||
Move forward a character.
|
||||
This may also be bound to the right arrow key on some keyboards.
|
||||
.TP
|
||||
.B backward\-char (C\-b)
|
||||
Move back a character.
|
||||
@@ -1064,10 +1074,12 @@ restore the history line to its original state.
|
||||
.B previous\-history (C\-p)
|
||||
Fetch the previous command from the history list, moving back in
|
||||
the list.
|
||||
This may also be bound to the up arrow key on some keyboards.
|
||||
.TP
|
||||
.B next\-history (C\-n)
|
||||
Fetch the next command from the history list, moving forward in the
|
||||
list.
|
||||
This may also be bound to the down arrow key on some keyboards.
|
||||
.TP
|
||||
.B beginning\-of\-history (M\-<)
|
||||
Move to the first line in the history.
|
||||
@@ -1414,33 +1426,35 @@ This command is unbound by default.
|
||||
Perform completion on the word before point as described above
|
||||
and write the list of possible completions to \fBreadline\fP's output
|
||||
stream using the following format, writing information on separate lines:
|
||||
.sp
|
||||
.IP
|
||||
.RS
|
||||
.nf
|
||||
The number of matches;
|
||||
The word being completed;
|
||||
S:E, where S and E are the start and end offsets of the word
|
||||
in the readline line buffer; then
|
||||
Each match, one per line
|
||||
.fi
|
||||
.PD
|
||||
.IP \(bu
|
||||
.PD 0
|
||||
the number of matches \fIN\fP;
|
||||
.IP \(bu
|
||||
the word being completed;
|
||||
.IP \(bu
|
||||
\fIS\fP:\fIE\fP,
|
||||
where S and E are the start and end offsets of the word
|
||||
in the \fBreadline\fP line buffer; then
|
||||
.IP \(bu
|
||||
each match, one per line
|
||||
.RE
|
||||
.sp
|
||||
.IP
|
||||
If there are no matches, the first line will be 0, and this command will
|
||||
not print any output after the S:E.
|
||||
If there is only a single match, this prints a single line containing it.
|
||||
If there is more than one match, this prints the common prefix of the
|
||||
matches, which may be empty, on the first line after the S:E,
|
||||
then the matches on subsequent lines.
|
||||
In this case, N will include the first line with the common prefix.
|
||||
.PD
|
||||
.IP
|
||||
.PD 0
|
||||
If there are no matches, the first line will be
|
||||
.Q 0 ,
|
||||
and this command does not print any output after the \fIS\fP:\fIE\fP.
|
||||
If there is only a single match, this prints a single line containing it.
|
||||
If there is more than one match, this prints the common prefix of the
|
||||
matches, which may be empty, on the first line after the \fIS\fP:\fIE\fP,
|
||||
then the matches on subsequent lines.
|
||||
In this case, \fIN\fP will include the first line with the common prefix.
|
||||
.IP
|
||||
The user or application
|
||||
should be able to accommodate the possibility of a blank line.
|
||||
The intent is that the user or application reads N lines after the line
|
||||
containing S:E to obtain the match list.
|
||||
The intent is that the user or application reads \fIN\fP lines after
|
||||
the line containing \fIS\fP:\fIE\fP to obtain the match list.
|
||||
This command is unbound by default.
|
||||
.TP
|
||||
.B delete\-char\-or\-list
|
||||
@@ -1524,13 +1538,15 @@ A negative argument searches for subsequent occurrences.
|
||||
.B skip\-csi\-sequence
|
||||
Read enough characters to consume a multi-key sequence such as those
|
||||
defined for keys like Home and End.
|
||||
CSI sequences begin with a Control Sequence Indicator (CSI), usually ESC\-[.
|
||||
CSI sequences begin with a Control Sequence Indicator (CSI), usually
|
||||
.IR "ESC [" .
|
||||
If this sequence is bound to
|
||||
.Q \ee[ ,
|
||||
keys producing CSI sequences will have no effect
|
||||
unless explicitly bound to a \fBreadline\fP command, instead of inserting
|
||||
stray characters into the editing buffer.
|
||||
This is unbound by default, but usually bound to ESC\-[.
|
||||
keys producing CSI sequences have no effect
|
||||
unless explicitly bound to a \fBreadline\fP command,
|
||||
instead of inserting stray characters into the editing buffer.
|
||||
This is unbound by default, but usually bound to
|
||||
.IR "ESC [" .
|
||||
.TP
|
||||
.B insert\-comment (M\-#)
|
||||
Without a numeric argument, insert the value of the \fBreadline\fP
|
||||
@@ -1854,7 +1870,9 @@ library that you have.
|
||||
Once you have determined that a bug actually exists, mail a
|
||||
bug report to \fIbug\-readline\fP@\fIgnu.org\fP.
|
||||
If you have a fix, you are welcome to mail that
|
||||
as well! Suggestions and `philosophical' bug reports may be mailed
|
||||
as well! Suggestions and
|
||||
.Q philosophical
|
||||
bug reports may be mailed
|
||||
to \fPbug-readline\fP@\fIgnu.org\fP or posted to the Usenet
|
||||
newsgroup
|
||||
.BR gnu.bash.bug .
|
||||
|
||||
Binary file not shown.
+633
-565
File diff suppressed because it is too large
Load Diff
+149
-145
@@ -1,6 +1,6 @@
|
||||
This is readline.info, produced by makeinfo version 7.1 from rlman.texi.
|
||||
|
||||
This manual describes the GNU Readline Library (version 8.3, 15 November
|
||||
This manual describes the GNU Readline Library (version 8.3, 29 November
|
||||
2024), a library which aids in the consistency of user interface across
|
||||
discrete programs which provide a command line interface.
|
||||
|
||||
@@ -292,19 +292,19 @@ mode, type ‘C-r’ to search backward in the history for a particular
|
||||
string. Typing ‘C-s’ searches forward through the history. The
|
||||
characters present in the value of the ‘isearch-terminators’ variable
|
||||
are used to terminate an incremental search. If that variable has not
|
||||
been assigned a value, the <ESC> and ‘C-J’ characters will terminate an
|
||||
incremental search. ‘C-g’ will abort an incremental search and restore
|
||||
the original line. When the search is terminated, the history entry
|
||||
been assigned a value, the <ESC> and ‘C-j’ characters terminate an
|
||||
incremental search. ‘C-g’ aborts an incremental search and restores the
|
||||
original line. When the search is terminated, the history entry
|
||||
containing the search string becomes the current line.
|
||||
|
||||
To find other matching entries in the history list, type ‘C-r’ or
|
||||
‘C-s’ as appropriate. This will search backward or forward in the
|
||||
history for the next entry matching the search string typed so far. Any
|
||||
other key sequence bound to a Readline command will terminate the search
|
||||
and execute that command. For instance, a <RET> will terminate the
|
||||
search and accept the line, thereby executing the command from the
|
||||
history list. A movement command will terminate the search, make the
|
||||
last line found the current line, and begin editing.
|
||||
‘C-s’ as appropriate. This searches backward or forward in the history
|
||||
for the next entry matching the search string typed so far. Any other
|
||||
key sequence bound to a Readline command terminates the search and
|
||||
executes that command. For instance, a <RET> terminates the search and
|
||||
accepts the line, thereby executing the command from the history list.
|
||||
A movement command will terminate the search, make the last line found
|
||||
the current line, and begin editing.
|
||||
|
||||
Readline remembers the last incremental search string. If two ‘C-r’s
|
||||
are typed without any intervening characters defining a new search
|
||||
@@ -329,7 +329,7 @@ environment variable ‘INPUTRC’. If that variable is unset, the default
|
||||
is ‘~/.inputrc’. If that file does not exist or cannot be read,
|
||||
Readline looks for ‘/etc/inputrc’.
|
||||
|
||||
When a program which uses the Readline library starts up, Readline
|
||||
When a program that uses the Readline library starts up, Readline
|
||||
reads the init file and sets any variables and key bindings it contains.
|
||||
|
||||
In addition, the ‘C-x C-r’ command re-reads this init file, thus
|
||||
@@ -445,8 +445,8 @@ Variable Settings
|
||||
The number of screen columns used to display possible matches
|
||||
when performing completion. The value is ignored if it is
|
||||
less than 0 or greater than the terminal screen width. A
|
||||
value of 0 will cause matches to be displayed one per line.
|
||||
The default value is -1.
|
||||
value of 0 causes matches to be displayed one per line. The
|
||||
default value is -1.
|
||||
|
||||
‘completion-ignore-case’
|
||||
If set to ‘on’, Readline performs filename matching and
|
||||
@@ -470,19 +470,19 @@ Variable Settings
|
||||
The number of possible completions that determines when the
|
||||
user is asked whether the list of possibilities should be
|
||||
displayed. If the number of possible completions is greater
|
||||
than or equal to this value, Readline will ask whether or not
|
||||
the user wishes to view them; otherwise, Readline simply lists
|
||||
the completions. This variable must be set to an integer
|
||||
value greater than or equal to zero. A zero value means
|
||||
Readline should never ask; negative values are treated as
|
||||
zero. The default limit is ‘100’.
|
||||
than or equal to this value, Readline asks whether or not the
|
||||
user wishes to view them; otherwise, Readline simply lists the
|
||||
completions. This variable must be set to an integer value
|
||||
greater than or equal to zero. A zero value means Readline
|
||||
should never ask; negative values are treated as zero. The
|
||||
default limit is ‘100’.
|
||||
|
||||
‘convert-meta’
|
||||
If set to ‘on’, Readline will convert characters it reads that
|
||||
If set to ‘on’, Readline converts characters it reads that
|
||||
have the eighth bit set to an ASCII key sequence by clearing
|
||||
the eighth bit and prefixing an <ESC> character, converting
|
||||
them to a meta-prefixed key sequence. The default value is
|
||||
‘on’, but Readline will set it to ‘off’ if the locale contains
|
||||
‘on’, but Readline sets it to ‘off’ if the locale contains
|
||||
characters whose encodings may include bytes with the eighth
|
||||
bit set. This variable is dependent on the ‘LC_CTYPE’ locale
|
||||
category, and may change if the locale changes. This variable
|
||||
@@ -490,9 +490,9 @@ Variable Settings
|
||||
‘force-meta-prefix’ below.
|
||||
|
||||
‘disable-completion’
|
||||
If set to ‘On’, Readline will inhibit word completion.
|
||||
Completion characters will be inserted into the line as if
|
||||
they had been mapped to ‘self-insert’. The default is ‘off’.
|
||||
If set to ‘On’, Readline inhibits word completion. Completion
|
||||
characters are inserted into the line as if they had been
|
||||
mapped to ‘self-insert’. The default is ‘off’.
|
||||
|
||||
‘echo-control-characters’
|
||||
When set to ‘on’, on operating systems that indicate they
|
||||
@@ -538,18 +538,18 @@ Variable Settings
|
||||
appearing in the pasted text. The default is ‘On’.
|
||||
|
||||
‘enable-keypad’
|
||||
When set to ‘on’, Readline will try to enable the application
|
||||
When set to ‘on’, Readline tries to enable the application
|
||||
keypad when it is called. Some systems need this to enable
|
||||
the arrow keys. The default is ‘off’.
|
||||
|
||||
‘enable-meta-key’
|
||||
When set to ‘on’, Readline will try to enable any meta
|
||||
modifier key the terminal claims to support when it is called.
|
||||
On many terminals, the Meta key is used to send eight-bit
|
||||
characters; this variable checks for the terminal capability
|
||||
that indicates the terminal can enable and disable a mode that
|
||||
sets the eighth bit of a character (0200) if the Meta key is
|
||||
held down when the character is typed (a meta character). The
|
||||
When set to ‘on’, Readline tries to enable any meta modifier
|
||||
key the terminal claims to support when it is called. On many
|
||||
terminals, the Meta key is used to send eight-bit characters;
|
||||
this variable checks for the terminal capability that
|
||||
indicates the terminal can enable and disable a mode that sets
|
||||
the eighth bit of a character (0200) if the Meta key is held
|
||||
down when the character is typed (a meta character). The
|
||||
default is ‘on’.
|
||||
|
||||
‘expand-tilde’
|
||||
@@ -593,22 +593,22 @@ Variable Settings
|
||||
default, this variable is set to ‘off’.
|
||||
|
||||
‘input-meta’
|
||||
If set to ‘on’, Readline will enable eight-bit input (that is,
|
||||
it will not clear the eighth bit in the characters it reads),
|
||||
If set to ‘on’, Readline enables eight-bit input (that is, it
|
||||
does not clear the eighth bit in the characters it reads),
|
||||
regardless of what the terminal claims it can support. The
|
||||
default value is ‘off’, but Readline will set it to ‘on’ if
|
||||
the locale contains characters whose encodings may include
|
||||
bytes with the eighth bit set. This variable is dependent on
|
||||
the ‘LC_CTYPE’ locale category, and its value may change if
|
||||
the locale changes. The name ‘meta-flag’ is a synonym for
|
||||
default value is ‘off’, but Readline sets it to ‘on’ if the
|
||||
locale contains characters whose encodings may include bytes
|
||||
with the eighth bit set. This variable is dependent on the
|
||||
‘LC_CTYPE’ locale category, and its value may change if the
|
||||
locale changes. The name ‘meta-flag’ is a synonym for
|
||||
‘input-meta’.
|
||||
|
||||
‘isearch-terminators’
|
||||
The string of characters that should terminate an incremental
|
||||
search without subsequently executing the character as a
|
||||
command (*note Searching::). If this variable has not been
|
||||
given a value, the characters <ESC> and ‘C-J’ will terminate
|
||||
an incremental search.
|
||||
given a value, the characters <ESC> and ‘C-j’ terminate an
|
||||
incremental search.
|
||||
|
||||
‘keymap’
|
||||
Sets Readline's idea of the current keymap for key binding
|
||||
@@ -625,23 +625,23 @@ Variable Settings
|
||||
reading an ambiguous key sequence (one that can form a
|
||||
complete key sequence using the input read so far, or can take
|
||||
additional input to complete a longer key sequence). If
|
||||
Readline doesn't receive any input within the timeout, it will
|
||||
use the shorter but complete key sequence. Readline uses this
|
||||
Readline doesn't receive any input within the timeout, it uses
|
||||
the shorter but complete key sequence. Readline uses this
|
||||
value to determine whether or not input is available on the
|
||||
current input source (‘rl_instream’ by default). The value is
|
||||
specified in milliseconds, so a value of 1000 means that
|
||||
Readline will wait one second for additional input. If this
|
||||
variable is set to a value less than or equal to zero, or to a
|
||||
non-numeric value, Readline will wait until another key is
|
||||
pressed to decide which key sequence to complete. The default
|
||||
value is ‘500’.
|
||||
non-numeric value, Readline waits until another key is pressed
|
||||
to decide which key sequence to complete. The default value
|
||||
is ‘500’.
|
||||
|
||||
‘mark-directories’
|
||||
If set to ‘on’, completed directory names have a slash
|
||||
appended. The default is ‘on’.
|
||||
|
||||
‘mark-modified-lines’
|
||||
When this variable is set to ‘on’, Readline will to display an
|
||||
When this variable is set to ‘on’, Readline displays an
|
||||
asterisk (‘*’) at the start of history lines which have been
|
||||
modified. This variable is ‘off’ by default.
|
||||
|
||||
@@ -663,24 +663,24 @@ Variable Settings
|
||||
cycling through the list. The default is ‘off’.
|
||||
|
||||
‘output-meta’
|
||||
If set to ‘on’, Readline will display characters with the
|
||||
eighth bit set directly rather than as a meta-prefixed escape
|
||||
sequence. The default is ‘off’, but Readline will set it to
|
||||
‘on’ if the locale contains characters whose encodings may
|
||||
include bytes with the eighth bit set. This variable is
|
||||
dependent on the ‘LC_CTYPE’ locale category, and its value may
|
||||
change if the locale changes.
|
||||
If set to ‘on’, Readline displays characters with the eighth
|
||||
bit set directly rather than as a meta-prefixed escape
|
||||
sequence. The default is ‘off’, but Readline sets it to ‘on’
|
||||
if the locale contains characters whose encodings may include
|
||||
bytes with the eighth bit set. This variable is dependent on
|
||||
the ‘LC_CTYPE’ locale category, and its value may change if
|
||||
the locale changes.
|
||||
|
||||
‘page-completions’
|
||||
If set to ‘on’, Readline uses an internal ‘more’-like pager to
|
||||
display a screenful of possible completions at a time. This
|
||||
variable is ‘on’ by default.
|
||||
If set to ‘on’, Readline uses an internal pager resembling
|
||||
more(1) to display a screenful of possible completions at a
|
||||
time. This variable is ‘on’ by default.
|
||||
|
||||
‘prefer-visible-bell’
|
||||
See ‘bell-style’.
|
||||
|
||||
‘print-completions-horizontally’
|
||||
If set to ‘on’, Readline will display completions with matches
|
||||
If set to ‘on’, Readline displays completions with matches
|
||||
sorted horizontally in alphabetical order, rather than down
|
||||
the screen. The default is ‘off’.
|
||||
|
||||
@@ -1109,10 +1109,12 @@ File: readline.info, Node: Commands For Moving, Next: Commands For History, U
|
||||
on some keyboards.
|
||||
|
||||
‘forward-char (C-f)’
|
||||
Move forward a character.
|
||||
Move forward a character. This may also be bound to the right
|
||||
arrow key on some keyboards.
|
||||
|
||||
‘backward-char (C-b)’
|
||||
Move back a character.
|
||||
Move back a character. This may also be bound to the left arrow
|
||||
key on some keyboards.
|
||||
|
||||
‘forward-word (M-f)’
|
||||
Move forward to the end of the next word. Words are composed of
|
||||
@@ -1162,10 +1164,12 @@ File: readline.info, Node: Commands For History, Next: Commands For Text, Pre
|
||||
|
||||
‘previous-history (C-p)’
|
||||
Move 'back' through the history list, fetching the previous
|
||||
command.
|
||||
command. This may also be bound to the up arrow key on some
|
||||
keyboards.
|
||||
|
||||
‘next-history (C-n)’
|
||||
Move 'forward' through the history list, fetching the next command.
|
||||
This may also be bound to the down arrow key on some keyboards.
|
||||
|
||||
‘beginning-of-history (M-<)’
|
||||
Move to the first line in the history.
|
||||
@@ -1482,19 +1486,19 @@ File: readline.info, Node: Commands For Completion, Next: Keyboard Macros, Pr
|
||||
write the list of possible completions to Readline's output stream
|
||||
using the following format, writing information on separate lines:
|
||||
|
||||
The number of matches;
|
||||
The word being completed;
|
||||
S:E, where S and E are the start and end offsets of the word
|
||||
in the readline line buffer; then
|
||||
Each match, one per line
|
||||
• the number of matches N;
|
||||
• the word being completed;
|
||||
• S:E, where S and E are the start and end offsets of the word
|
||||
in the Readline line buffer; then
|
||||
• each match, one per line
|
||||
|
||||
If there are no matches, the first line will be 0, and this command
|
||||
will not print any output after the S:E. If there is only a single
|
||||
match, this prints a single line containing it. If there is more
|
||||
than one match, this prints the common prefix of the matches, which
|
||||
may be empty, on the first line after the S:E, then the matches on
|
||||
subsequent lines. In this case, N will include the first line with
|
||||
the common prefix.
|
||||
If there are no matches, the first line will be "0", and this
|
||||
command does not print any output after the S:E. If there is only
|
||||
a single match, this prints a single line containing it. If there
|
||||
is more than one match, this prints the common prefix of the
|
||||
matches, which may be empty, on the first line after the S:E, then
|
||||
the matches on subsequent lines. In this case, N will include the
|
||||
first line with the common prefix.
|
||||
|
||||
The user or application should be able to accommodate the
|
||||
possibility of a blank line. The intent is that the user or
|
||||
@@ -1581,11 +1585,11 @@ File: readline.info, Node: Miscellaneous Commands, Prev: Keyboard Macros, Up:
|
||||
‘skip-csi-sequence ()’
|
||||
Read enough characters to consume a multi-key sequence such as
|
||||
those defined for keys like Home and End. CSI sequences begin with
|
||||
a Control Sequence Indicator (CSI), usually ESC-[. If this
|
||||
sequence is bound to "\e[", keys producing CSI sequences will have
|
||||
no effect unless explicitly bound to a Readline command, instead of
|
||||
a Control Sequence Indicator (CSI), usually ‘ESC [’. If this
|
||||
sequence is bound to "\e[", keys producing CSI sequences have no
|
||||
effect unless explicitly bound to a Readline command, instead of
|
||||
inserting stray characters into the editing buffer. This is
|
||||
unbound by default, but usually bound to ESC-[.
|
||||
unbound by default, but usually bound to ‘ESC [’.
|
||||
|
||||
‘insert-comment (M-#)’
|
||||
Without a numeric argument, insert the value of the ‘comment-begin’
|
||||
@@ -4908,15 +4912,15 @@ Function and Variable Index
|
||||
(line 48)
|
||||
* active-region-start-color: Readline Init File Syntax.
|
||||
(line 35)
|
||||
* backward-char (C-b): Commands For Moving. (line 17)
|
||||
* backward-char (C-b): Commands For Moving. (line 18)
|
||||
* backward-delete-char (Rubout): Commands For Text. (line 18)
|
||||
* backward-kill-line (C-x Rubout): Commands For Killing.
|
||||
(line 11)
|
||||
* backward-kill-word (M-<DEL>): Commands For Killing.
|
||||
(line 28)
|
||||
* backward-word (M-b): Commands For Moving. (line 24)
|
||||
* backward-word (M-b): Commands For Moving. (line 26)
|
||||
* beginning-of-history (M-<): Commands For History.
|
||||
(line 19)
|
||||
(line 21)
|
||||
* beginning-of-line (C-a): Commands For Moving. (line 6)
|
||||
* bell-style: Readline Init File Syntax.
|
||||
(line 61)
|
||||
@@ -4931,8 +4935,8 @@ Function and Variable Index
|
||||
(line 41)
|
||||
* character-search-backward (M-C-]): Miscellaneous Commands.
|
||||
(line 45)
|
||||
* clear-display (M-C-l): Commands For Moving. (line 42)
|
||||
* clear-screen (C-l): Commands For Moving. (line 47)
|
||||
* clear-display (M-C-l): Commands For Moving. (line 44)
|
||||
* clear-screen (C-l): Commands For Moving. (line 49)
|
||||
* colored-completion-prefix: Readline Init File Syntax.
|
||||
(line 81)
|
||||
* colored-stats: Readline Init File Syntax.
|
||||
@@ -4995,7 +4999,7 @@ Function and Variable Index
|
||||
* end-kbd-macro (C-x )): Keyboard Macros. (line 9)
|
||||
* end-of-file (usually C-d): Commands For Text. (line 6)
|
||||
* end-of-history (M->): Commands For History.
|
||||
(line 22)
|
||||
(line 24)
|
||||
* end-of-line (C-e): Commands For Moving. (line 10)
|
||||
* exchange-point-and-mark (C-x C-x): Miscellaneous Commands.
|
||||
(line 37)
|
||||
@@ -5006,26 +5010,26 @@ Function and Variable Index
|
||||
* export-completions (): Commands For Completion.
|
||||
(line 38)
|
||||
* fetch-history (): Commands For History.
|
||||
(line 105)
|
||||
(line 107)
|
||||
* force-meta-prefix: Readline Init File Syntax.
|
||||
(line 216)
|
||||
* forward-backward-delete-char (): Commands For Text. (line 23)
|
||||
* forward-char (C-f): Commands For Moving. (line 14)
|
||||
* forward-search-history (C-s): Commands For History.
|
||||
(line 32)
|
||||
* forward-word (M-f): Commands For Moving. (line 20)
|
||||
(line 34)
|
||||
* forward-word (M-f): Commands For Moving. (line 22)
|
||||
* history-preserve-point: Readline Init File Syntax.
|
||||
(line 229)
|
||||
* history-search-backward (): Commands For History.
|
||||
(line 50)
|
||||
(line 52)
|
||||
* history-search-forward (): Commands For History.
|
||||
(line 57)
|
||||
(line 59)
|
||||
* history-size: Readline Init File Syntax.
|
||||
(line 235)
|
||||
* history-substring-search-backward (): Commands For History.
|
||||
(line 64)
|
||||
(line 66)
|
||||
* history-substring-search-forward (): Commands For History.
|
||||
(line 70)
|
||||
(line 72)
|
||||
* horizontal-scroll-mode: Readline Init File Syntax.
|
||||
(line 244)
|
||||
* input-meta: Readline Init File Syntax.
|
||||
@@ -5061,14 +5065,14 @@ Function and Variable Index
|
||||
* meta-flag: Readline Init File Syntax.
|
||||
(line 252)
|
||||
* next-history (C-n): Commands For History.
|
||||
(line 16)
|
||||
* next-screen-line (): Commands For Moving. (line 35)
|
||||
(line 17)
|
||||
* next-screen-line (): Commands For Moving. (line 37)
|
||||
* non-incremental-forward-search-history (M-n): Commands For History.
|
||||
(line 44)
|
||||
(line 46)
|
||||
* non-incremental-reverse-search-history (M-p): Commands For History.
|
||||
(line 38)
|
||||
(line 40)
|
||||
* operate-and-get-next (C-o): Commands For History.
|
||||
(line 98)
|
||||
(line 100)
|
||||
* output-meta: Readline Init File Syntax.
|
||||
(line 322)
|
||||
* overwrite-mode (): Commands For Text. (line 73)
|
||||
@@ -5080,15 +5084,15 @@ Function and Variable Index
|
||||
(line 19)
|
||||
* previous-history (C-p): Commands For History.
|
||||
(line 12)
|
||||
* previous-screen-line (): Commands For Moving. (line 28)
|
||||
* previous-screen-line (): Commands For Moving. (line 30)
|
||||
* print-last-kbd-macro (): Keyboard Macros. (line 17)
|
||||
* quoted-insert (C-q or C-v): Commands For Text. (line 28)
|
||||
* re-read-init-file (C-x C-r): Miscellaneous Commands.
|
||||
(line 6)
|
||||
* readline: Basic Behavior. (line 11)
|
||||
* redraw-current-line (): Commands For Moving. (line 51)
|
||||
* redraw-current-line (): Commands For Moving. (line 53)
|
||||
* reverse-search-history (C-r): Commands For History.
|
||||
(line 26)
|
||||
(line 28)
|
||||
* revert-all-at-newline: Readline Init File Syntax.
|
||||
(line 344)
|
||||
* revert-line (M-r): Miscellaneous Commands.
|
||||
@@ -5428,9 +5432,9 @@ Function and Variable Index
|
||||
* yank (C-y): Commands For Killing.
|
||||
(line 63)
|
||||
* yank-last-arg (M-. or M-_): Commands For History.
|
||||
(line 86)
|
||||
(line 88)
|
||||
* yank-nth-arg (M-C-y): Commands For History.
|
||||
(line 76)
|
||||
(line 78)
|
||||
* yank-pop (M-y): Commands For Killing.
|
||||
(line 66)
|
||||
|
||||
@@ -5446,50 +5450,50 @@ Node: Readline Movement Commands7601
|
||||
Node: Readline Killing Commands8601
|
||||
Node: Readline Arguments10628
|
||||
Node: Searching11689
|
||||
Node: Readline Init File13920
|
||||
Node: Readline Init File Syntax15118
|
||||
Node: Conditional Init Constructs41510
|
||||
Node: Sample Init File45899
|
||||
Node: Bindable Readline Commands49024
|
||||
Node: Commands For Moving50408
|
||||
Node: Commands For History52338
|
||||
Node: Commands For Text57543
|
||||
Node: Commands For Killing61388
|
||||
Node: Numeric Arguments63844
|
||||
Node: Commands For Completion65000
|
||||
Node: Keyboard Macros68270
|
||||
Node: Miscellaneous Commands68975
|
||||
Node: Readline vi Mode73299
|
||||
Node: Programming with GNU Readline75196
|
||||
Node: Basic Behavior76182
|
||||
Node: Custom Functions80245
|
||||
Node: Readline Typedefs81767
|
||||
Node: Function Writing83653
|
||||
Node: Readline Variables84959
|
||||
Node: Readline Convenience Functions99913
|
||||
Node: Function Naming100989
|
||||
Node: Keymaps102320
|
||||
Node: Binding Keys105482
|
||||
Node: Associating Function Names and Bindings110307
|
||||
Node: Allowing Undoing114137
|
||||
Node: Redisplay116887
|
||||
Node: Modifying Text121189
|
||||
Node: Character Input122728
|
||||
Node: Terminal Management125885
|
||||
Node: Utility Functions127772
|
||||
Node: Miscellaneous Functions130882
|
||||
Node: Alternate Interface134772
|
||||
Node: A Readline Example137667
|
||||
Node: Alternate Interface Example139585
|
||||
Node: Readline Signal Handling143204
|
||||
Node: Custom Completers152754
|
||||
Node: How Completing Works153474
|
||||
Node: Completion Functions156850
|
||||
Node: Completion Variables160517
|
||||
Node: A Short Completion Example178835
|
||||
Node: GNU Free Documentation License191504
|
||||
Node: Concept Index216681
|
||||
Node: Function and Variable Index218202
|
||||
Node: Readline Init File13902
|
||||
Node: Readline Init File Syntax15099
|
||||
Node: Conditional Init Constructs41427
|
||||
Node: Sample Init File45816
|
||||
Node: Bindable Readline Commands48941
|
||||
Node: Commands For Moving50325
|
||||
Node: Commands For History52396
|
||||
Node: Commands For Text57738
|
||||
Node: Commands For Killing61583
|
||||
Node: Numeric Arguments64039
|
||||
Node: Commands For Completion65195
|
||||
Node: Keyboard Macros68478
|
||||
Node: Miscellaneous Commands69183
|
||||
Node: Readline vi Mode73514
|
||||
Node: Programming with GNU Readline75411
|
||||
Node: Basic Behavior76397
|
||||
Node: Custom Functions80460
|
||||
Node: Readline Typedefs81982
|
||||
Node: Function Writing83868
|
||||
Node: Readline Variables85174
|
||||
Node: Readline Convenience Functions100128
|
||||
Node: Function Naming101204
|
||||
Node: Keymaps102535
|
||||
Node: Binding Keys105697
|
||||
Node: Associating Function Names and Bindings110522
|
||||
Node: Allowing Undoing114352
|
||||
Node: Redisplay117102
|
||||
Node: Modifying Text121404
|
||||
Node: Character Input122943
|
||||
Node: Terminal Management126100
|
||||
Node: Utility Functions127987
|
||||
Node: Miscellaneous Functions131097
|
||||
Node: Alternate Interface134987
|
||||
Node: A Readline Example137882
|
||||
Node: Alternate Interface Example139800
|
||||
Node: Readline Signal Handling143419
|
||||
Node: Custom Completers152969
|
||||
Node: How Completing Works153689
|
||||
Node: Completion Functions157065
|
||||
Node: Completion Variables160732
|
||||
Node: A Short Completion Example179050
|
||||
Node: GNU Free Documentation License191719
|
||||
Node: Concept Index216896
|
||||
Node: Function and Variable Index218417
|
||||
|
||||
End Tag Table
|
||||
|
||||
|
||||
Binary file not shown.
+1008
-958
File diff suppressed because it is too large
Load Diff
Binary file not shown.
+143
-92
@@ -339,18 +339,18 @@ Typing @kbd{C-s} searches forward through the history.
|
||||
The characters present in the value of the @code{isearch-terminators} variable
|
||||
are used to terminate an incremental search.
|
||||
If that variable has not been assigned a value, the @key{ESC} and
|
||||
@kbd{C-J} characters will terminate an incremental search.
|
||||
@kbd{C-g} will abort an incremental search and restore the original line.
|
||||
@kbd{C-j} characters terminate an incremental search.
|
||||
@kbd{C-g} aborts an incremental search and restores the original line.
|
||||
When the search is terminated, the history entry containing the
|
||||
search string becomes the current line.
|
||||
|
||||
To find other matching entries in the history list, type @kbd{C-r} or
|
||||
@kbd{C-s} as appropriate.
|
||||
This will search backward or forward in the history for the next
|
||||
This searches backward or forward in the history for the next
|
||||
entry matching the search string typed so far.
|
||||
Any other key sequence bound to a Readline command will terminate
|
||||
the search and execute that command.
|
||||
For instance, a @key{RET} will terminate the search and accept
|
||||
Any other key sequence bound to a Readline command terminates
|
||||
the search and executes that command.
|
||||
For instance, a @key{RET} terminates the search and accepts
|
||||
the line, thereby executing the command from the history list.
|
||||
A movement command will terminate the search, make the last line found
|
||||
the current line, and begin editing.
|
||||
@@ -389,7 +389,7 @@ keybindings and variables.
|
||||
@xref{Bash Builtins}.
|
||||
@end ifset
|
||||
|
||||
When a program which uses the Readline library starts up, Readline reads
|
||||
When a program that uses the Readline library starts up, Readline reads
|
||||
the init file and sets any variables and key bindings it contains.
|
||||
|
||||
In addition, the @code{C-x C-r} command re-reads this init file, thus
|
||||
@@ -532,7 +532,7 @@ The number of screen columns used to display possible matches
|
||||
when performing completion.
|
||||
The value is ignored if it is less than 0 or greater than the terminal
|
||||
screen width.
|
||||
A value of 0 will cause matches to be displayed one per line.
|
||||
A value of 0 causes matches to be displayed one per line.
|
||||
The default value is -1.
|
||||
|
||||
@item completion-ignore-case
|
||||
@@ -562,8 +562,8 @@ with an ellipsis when displaying possible completions.
|
||||
The number of possible completions that determines when the user is asked
|
||||
whether the list of possibilities should be displayed.
|
||||
If the number of possible completions is greater than
|
||||
or equal to this value, Readline will ask whether or not
|
||||
the user wishes to view them;
|
||||
or equal to this value,
|
||||
Readline asks whether or not the user wishes to view them;
|
||||
otherwise, Readline simply lists the completions.
|
||||
This variable must be set to an integer value greater than or equal to zero.
|
||||
A zero value means Readline should never ask; negative
|
||||
@@ -572,11 +572,11 @@ The default limit is @code{100}.
|
||||
|
||||
@item convert-meta
|
||||
@vindex convert-meta
|
||||
If set to @samp{on}, Readline will convert characters it reads
|
||||
If set to @samp{on}, Readline converts characters it reads
|
||||
that have the eighth bit set to an @sc{ascii} key sequence by
|
||||
clearing the eighth bit and prefixing an @key{ESC} character,
|
||||
converting them to a meta-prefixed key sequence.
|
||||
The default value is @samp{on}, but Readline will set it to @samp{off}
|
||||
The default value is @samp{on}, but Readline sets it to @samp{off}
|
||||
if the locale contains
|
||||
characters whose encodings may include bytes with the eighth bit set.
|
||||
This variable is dependent on the @code{LC_CTYPE} locale category, and
|
||||
@@ -586,8 +586,8 @@ see the description of @code{force-meta-prefix} below.
|
||||
|
||||
@item disable-completion
|
||||
@vindex disable-completion
|
||||
If set to @samp{On}, Readline will inhibit word completion.
|
||||
Completion characters will be inserted into the line as if they
|
||||
If set to @samp{On}, Readline inhibits word completion.
|
||||
Completion characters are inserted into the line as if they
|
||||
had been mapped to @code{self-insert}.
|
||||
The default is @samp{off}.
|
||||
|
||||
@@ -645,14 +645,14 @@ The default is @samp{On}.
|
||||
|
||||
@item enable-keypad
|
||||
@vindex enable-keypad
|
||||
When set to @samp{on}, Readline will try to enable the application
|
||||
When set to @samp{on}, Readline tries to enable the application
|
||||
keypad when it is called.
|
||||
Some systems need this to enable the arrow keys.
|
||||
The default is @samp{off}.
|
||||
|
||||
@item enable-meta-key
|
||||
@vindex enable-meta-key
|
||||
When set to @samp{on}, Readline will try to enable any meta
|
||||
When set to @samp{on}, Readline tries to enable any meta
|
||||
modifier key the terminal claims to support when it is called.
|
||||
On many terminals, the Meta key is used to send eight-bit characters;
|
||||
this variable checks for the terminal capability that indicates the
|
||||
@@ -721,10 +721,10 @@ By default, this variable is set to @samp{off}.
|
||||
@item input-meta
|
||||
@vindex input-meta
|
||||
@vindex meta-flag
|
||||
If set to @samp{on}, Readline will enable eight-bit input (that is, it
|
||||
will not clear the eighth bit in the characters it reads),
|
||||
If set to @samp{on}, Readline enables eight-bit input (that is, it
|
||||
does not clear the eighth bit in the characters it reads),
|
||||
regardless of what the terminal claims it can support.
|
||||
The default value is @samp{off}, but Readline will set it to @samp{on}
|
||||
The default value is @samp{off}, but Readline sets it to @samp{on}
|
||||
if the locale contains characters whose encodings may include bytes
|
||||
with the eighth bit set.
|
||||
This variable is dependent on the @code{LC_CTYPE} locale category, and
|
||||
@@ -736,7 +736,7 @@ The name @code{meta-flag} is a synonym for @code{input-meta}.
|
||||
The string of characters that should terminate an incremental search without
|
||||
subsequently executing the character as a command (@pxref{Searching}).
|
||||
If this variable has not been given a value, the characters @key{ESC} and
|
||||
@kbd{C-J} will terminate an incremental search.
|
||||
@kbd{C-j} terminate an incremental search.
|
||||
|
||||
@item keymap
|
||||
@vindex keymap
|
||||
@@ -762,14 +762,14 @@ Specifies the duration Readline will wait for a character when
|
||||
reading an ambiguous key sequence
|
||||
(one that can form a complete key sequence using the input read so far,
|
||||
or can take additional input to complete a longer key sequence).
|
||||
If Readline doesn't receive any input within the timeout, it will use the
|
||||
If Readline doesn't receive any input within the timeout, it uses the
|
||||
shorter but complete key sequence.
|
||||
Readline uses this value to determine whether or not input is
|
||||
available on the current input source (@code{rl_instream} by default).
|
||||
The value is specified in milliseconds, so a value of 1000 means that
|
||||
Readline will wait one second for additional input.
|
||||
If this variable is set to a value less than or equal to zero, or to a
|
||||
non-numeric value, Readline will wait until another key is pressed to
|
||||
non-numeric value, Readline waits until another key is pressed to
|
||||
decide which key sequence to complete.
|
||||
The default value is @code{500}.
|
||||
|
||||
@@ -779,7 +779,7 @@ The default is @samp{on}.
|
||||
|
||||
@item mark-modified-lines
|
||||
@vindex mark-modified-lines
|
||||
When this variable is set to @samp{on}, Readline will to display an
|
||||
When this variable is set to @samp{on}, Readline displays an
|
||||
asterisk (@samp{*}) at the start of history lines which have been modified.
|
||||
This variable is @samp{off} by default.
|
||||
|
||||
@@ -807,10 +807,10 @@ The default is @samp{off}.
|
||||
|
||||
@item output-meta
|
||||
@vindex output-meta
|
||||
If set to @samp{on}, Readline will display characters with the
|
||||
If set to @samp{on}, Readline displays characters with the
|
||||
eighth bit set directly rather than as a meta-prefixed escape
|
||||
sequence.
|
||||
The default is @samp{off}, but Readline will set it to @samp{on}
|
||||
The default is @samp{off}, but Readline sets it to @samp{on}
|
||||
if the locale contains characters whose encodings may include
|
||||
bytes with the eighth bit set.
|
||||
This variable is dependent on the @code{LC_CTYPE} locale category, and
|
||||
@@ -818,7 +818,8 @@ its value may change if the locale changes.
|
||||
|
||||
@item page-completions
|
||||
@vindex page-completions
|
||||
If set to @samp{on}, Readline uses an internal @code{more}-like pager
|
||||
If set to @samp{on}, Readline uses an internal pager resembling
|
||||
@i{more}(1)
|
||||
to display a screenful of possible completions at a time.
|
||||
This variable is @samp{on} by default.
|
||||
|
||||
@@ -826,7 +827,7 @@ This variable is @samp{on} by default.
|
||||
See @code{bell-style}.
|
||||
|
||||
@item print-completions-horizontally
|
||||
If set to @samp{on}, Readline will display completions with matches
|
||||
If set to @samp{on}, Readline displays completions with matches
|
||||
sorted horizontally in alphabetical order, rather than down the screen.
|
||||
The default is @samp{off}.
|
||||
|
||||
@@ -971,7 +972,8 @@ This key binding syntax recognizes a number of symbolic character names:
|
||||
@var{NEWLINE},
|
||||
@var{RET},
|
||||
@var{RETURN},
|
||||
@var{RUBOUT} (a destructive backspace),
|
||||
@var{RUBOUT}
|
||||
(a destructive backspace),
|
||||
@var{SPACE},
|
||||
@var{SPC},
|
||||
and
|
||||
@@ -1331,9 +1333,11 @@ This may also be bound to the End key on some keyboards.
|
||||
|
||||
@item forward-char (C-f)
|
||||
Move forward a character.
|
||||
This may also be bound to the right arrow key on some keyboards.
|
||||
|
||||
@item backward-char (C-b)
|
||||
Move back a character.
|
||||
This may also be bound to the left arrow key on some keyboards.
|
||||
|
||||
@item forward-word (M-f)
|
||||
Move forward to the end of the next word.
|
||||
@@ -1404,9 +1408,11 @@ to its original state.
|
||||
|
||||
@item previous-history (C-p)
|
||||
Move `back' through the history list, fetching the previous command.
|
||||
This may also be bound to the up arrow key on some keyboards.
|
||||
|
||||
@item next-history (C-n)
|
||||
Move `forward' through the history list, fetching the next command.
|
||||
This may also be bound to the down arrow key on some keyboards.
|
||||
|
||||
@item beginning-of-history (M-<)
|
||||
Move to the first line in the history.
|
||||
@@ -1790,26 +1796,31 @@ Perform completion on the word before point as described above
|
||||
and write the list of possible completions to Readline's output stream
|
||||
using the following format, writing information on separate lines:
|
||||
|
||||
@example
|
||||
The number of matches;
|
||||
The word being completed;
|
||||
S:E, where S and E are the start and end offsets of the word
|
||||
in the readline line buffer; then
|
||||
Each match, one per line
|
||||
@end example
|
||||
@itemize @bullet
|
||||
@item
|
||||
the number of matches @var{N};
|
||||
@item
|
||||
the word being completed;
|
||||
@item
|
||||
@var{S}:@var{E},
|
||||
where S and E are the start and end offsets of the word
|
||||
in the Readline line buffer; then
|
||||
@item
|
||||
each match, one per line
|
||||
@end itemize
|
||||
|
||||
If there are no matches, the first line will be 0, and this command will
|
||||
not print any output after the S:E.
|
||||
If there are no matches, the first line will be ``0'',
|
||||
and this command does not print any output after the @var{S}:@var{E}.
|
||||
If there is only a single match, this prints a single line containing it.
|
||||
If there is more than one match, this prints the common prefix of the
|
||||
matches, which may be empty, on the first line after the S:E,
|
||||
matches, which may be empty, on the first line after the @var{S}:@var{E},
|
||||
then the matches on subsequent lines.
|
||||
In this case, N will include the first line with the common prefix.
|
||||
In this case, @var{N} will include the first line with the common prefix.
|
||||
|
||||
The user or application
|
||||
should be able to accommodate the possibility of a blank line.
|
||||
The intent is that the user or application reads N lines after the line
|
||||
containing S:E to obtain the match list.
|
||||
The intent is that the user or application reads @var{N} lines after
|
||||
the line containing @var{S}:@var{E} to obtain the match list.
|
||||
This command is unbound by default.
|
||||
|
||||
@item delete-char-or-list ()
|
||||
@@ -1959,12 +1970,14 @@ A negative argument searches for subsequent occurrences.
|
||||
@item skip-csi-sequence ()
|
||||
Read enough characters to consume a multi-key sequence such as those
|
||||
defined for keys like Home and End.
|
||||
CSI sequences begin with a Control Sequence Indicator (CSI), usually ESC-[.
|
||||
CSI sequences begin with a Control Sequence Indicator (CSI), usually
|
||||
@kbd{ESC [}.
|
||||
If this sequence is bound to "\e[",
|
||||
keys producing CSI sequences will have no effect
|
||||
unless explicitly bound to a Readline command, instead of inserting
|
||||
stray characters into the editing buffer.
|
||||
This is unbound by default, but usually bound to ESC-[.
|
||||
keys producing CSI sequences have no effect
|
||||
unless explicitly bound to a Readline command,
|
||||
instead of inserting stray characters into the editing buffer.
|
||||
This is unbound by default, but usually bound to
|
||||
@kbd{ESC [}.
|
||||
|
||||
@item insert-comment (M-#)
|
||||
Without a numeric argument, insert the value of the @code{comment-begin}
|
||||
@@ -2120,9 +2133,11 @@ so forth.
|
||||
@section Programmable Completion
|
||||
@cindex programmable completion
|
||||
|
||||
When the user attempts word completion for an argument to a command for
|
||||
which a completion specification (a @dfn{compspec}) has been defined
|
||||
using the @code{complete} builtin (@pxref{Programmable Completion Builtins}),
|
||||
When the user attempts word completion
|
||||
for a command or an argument to a command for which a
|
||||
completion specification (a @dfn{compspec}) has been defined
|
||||
using the @code{complete} builtin
|
||||
(@pxref{Programmable Completion Builtins}),
|
||||
Readline invokes the programmable completion facilities.
|
||||
|
||||
First, Bash identifies the command name.
|
||||
@@ -2131,15 +2146,24 @@ compspec is used to generate the list of possible completions for the word.
|
||||
If the command word is the empty string (completion attempted at the
|
||||
beginning of an empty line), Bash uses any compspec defined with
|
||||
the @option{-E} option to @code{complete}.
|
||||
The @option{-I} option to @code{complete}
|
||||
indicates that the command word is the first non-assignment word
|
||||
on the line, or after a command delimiter such as
|
||||
@samp{;} or @samp{|}.
|
||||
This usually indicates command name completion.
|
||||
|
||||
If the command word is a full pathname, Bash
|
||||
searches for a compspec for the full pathname first.
|
||||
If there is no compspec for the full pathname, Bash attempts to
|
||||
find a compspec for the portion following the final slash.
|
||||
If those searches do not result in a compspec, any compspec defined with
|
||||
the @option{-D} option to @code{complete} is used as the default.
|
||||
If there is no default compspec, Bash attempts alias expansion
|
||||
on the command word as a final resort, and attempts to find a compspec
|
||||
for the command word from any successful expansion.
|
||||
If those searches do not result in a compspec,
|
||||
or if there is no compspec for the command word,
|
||||
Bash uses any compspec defined with
|
||||
the @option{-D} option to @code{complete} as the default.
|
||||
If there is no default compspec, Bash performs alias expansion
|
||||
on the command word as a final resort,
|
||||
and attempts to find a compspec for the command word
|
||||
resulting from any successful expansion.
|
||||
|
||||
If a compspec is not found, Bash performs its default completion
|
||||
described above (@pxref{Commands For Completion}).
|
||||
@@ -2147,15 +2171,17 @@ Otherwise, once a compspec has been found, Bash uses it to generate
|
||||
the list of matching words.
|
||||
|
||||
First, Bash performs the @var{actions} specified by the compspec.
|
||||
Only matches which are prefixed by the word being completed are
|
||||
returned.
|
||||
This only returns matches which are prefixes
|
||||
of the word being completed.
|
||||
When the @option{-f} or @option{-d} option is used for filename or
|
||||
directory name completion, Bash uses shell the variable @env{FIGNORE}
|
||||
to filter the matches.
|
||||
@xref{Bash Variables}, for a description of @env{FIGNORE}.
|
||||
|
||||
Any completions specified by a filename expansion pattern to the
|
||||
@option{-G} option are generated next.
|
||||
Next, programmable completion generates matches
|
||||
specified by a pathname expansion pattern
|
||||
supplied as an argument to the
|
||||
@option{-G} option.
|
||||
The words generated by the pattern need not match the word being completed.
|
||||
Bash uses the @env{FIGNORE}
|
||||
variable to filter the matches, but does not use the
|
||||
@@ -2165,7 +2191,7 @@ Next, completion considers
|
||||
the string specified as the argument to the @option{-W} option.
|
||||
The string is first split using the characters in the @env{IFS}
|
||||
special variable as delimiters.
|
||||
Shell quoting is honored within the string, in order to provide a
|
||||
This honors shell quoting within the string, in order to provide a
|
||||
mechanism for the words to contain shell metacharacters or characters
|
||||
in the value of @env{IFS}.
|
||||
Each word is then expanded using
|
||||
@@ -2179,13 +2205,22 @@ completed, and the matching words become possible completions.
|
||||
|
||||
After these matches have been generated,
|
||||
Bash executes any shell function or command
|
||||
any shell function or command
|
||||
specified with the @option{-F} and @option{-C} options.
|
||||
When the command or function is invoked, the @env{COMP_LINE},
|
||||
@env{COMP_POINT}, @env{COMP_KEY}, and @env{COMP_TYPE} variables are
|
||||
assigned values as described above (@pxref{Bash Variables}).
|
||||
If a shell function is being invoked, the @env{COMP_WORDS} and
|
||||
@env{COMP_CWORD} variables are also set.
|
||||
When the command or function is invoked, Bash
|
||||
assigns values to the
|
||||
@env{COMP_LINE},
|
||||
@env{COMP_POINT},
|
||||
@env{COMP_KEY},
|
||||
and
|
||||
@env{COMP_TYPE}
|
||||
variables as described above
|
||||
(@pxref{Bash Variables}).
|
||||
If a shell function is being invoked, Bash
|
||||
also sets the
|
||||
@env{COMP_WORDS}
|
||||
and
|
||||
@env{COMP_CWORD}
|
||||
variables.
|
||||
When the function or command is invoked,
|
||||
the first argument ($1) is the name of the command whose arguments
|
||||
are being completed,
|
||||
@@ -2194,7 +2229,8 @@ and the third argument ($3) is the word preceding the word being
|
||||
completed on the current command line.
|
||||
There is no filtering of the generated completions against the
|
||||
word being completed;
|
||||
the function or command has complete freedom in generating the matches.
|
||||
the function or command has complete freedom in generating the matches
|
||||
and they do not need to match a prefix of the word.
|
||||
|
||||
Any function specified with @option{-F} is invoked first.
|
||||
The function may use any of the shell facilities, including the
|
||||
@@ -2207,26 +2243,31 @@ Next, any command specified with the @option{-C} option is invoked
|
||||
in an environment equivalent to command substitution.
|
||||
It should print a list of completions, one per line, to
|
||||
the standard output.
|
||||
Backslash may be used to escape a newline, if necessary.
|
||||
Backslash will escape a newline, if necessary.
|
||||
These are added to the set of possible completions.
|
||||
|
||||
After all of the possible completions are generated, any filter
|
||||
specified with the @option{-X} option is applied to the list.
|
||||
After generating all of the possible completions,
|
||||
Bash applies any filter
|
||||
specified with the @option{-X} option to the completions in the list.
|
||||
The filter is a pattern as used for pathname expansion; a @samp{&}
|
||||
in the pattern is replaced with the text of the word being completed.
|
||||
A literal @samp{&} may be escaped with a backslash; the backslash
|
||||
is removed before attempting a match.
|
||||
Any completion that matches the pattern will be removed from the list.
|
||||
A leading @samp{!} negates the pattern; in this case any completion
|
||||
not matching the pattern will be removed.
|
||||
If the @code{nocasematch} shell option
|
||||
(see the description of @code{shopt} in @ref{The Shopt Builtin})
|
||||
is enabled, the match is performed without regard to the case
|
||||
Any completion that matches the pattern is removed from the list.
|
||||
A leading @samp{!} negates the pattern;
|
||||
in this case Bash removes
|
||||
any completion that does not match the pattern.
|
||||
If the @code{nocasematch} shell option is enabled
|
||||
(see the description of @code{shopt} in @ref{The Shopt Builtin}),
|
||||
Bash performs the match without regard to the case
|
||||
of alphabetic characters.
|
||||
|
||||
Finally, any prefix and suffix specified with the @option{-P} and @option{-S}
|
||||
options are added to each member of the completion list, and the result is
|
||||
returned to Readline as the list of possible completions.
|
||||
Finally, programmable completion adds
|
||||
any prefix and suffix specified with the
|
||||
@option{-P} and @option{-S}
|
||||
options, respectively, to each completion,
|
||||
and returns the result
|
||||
to Readline as the list of possible completions.
|
||||
|
||||
If the previously-applied actions do not generate any matches, and the
|
||||
@option{-o dirnames} option was supplied to @code{complete} when the
|
||||
@@ -2241,19 +2282,29 @@ the completion code as the full set of possible completions.
|
||||
The default Bash completions and the Readline default
|
||||
of filename completion are disabled.
|
||||
If the @option{-o bashdefault} option was supplied to @code{complete} when
|
||||
the compspec was defined, if the compspec generates no matches,
|
||||
the compspec was defined, and the compspec generates no matches,
|
||||
Bash attempts its default completions.
|
||||
If the @option{-o default} option was supplied to @code{complete} when the
|
||||
compspec was defined, programmable completion will perform
|
||||
Readline's default completion
|
||||
if the compspec (and, if attempted, the default Bash completions)
|
||||
generate no matches.
|
||||
If the compspec and, if attempted, the default Bash completions
|
||||
generate no matches,
|
||||
and the @option{-o default} option was supplied to
|
||||
@code{complete} when the compspec was defined,
|
||||
programmable completion performs Readline's default completion.
|
||||
|
||||
When a compspec indicates that directory name completion is desired,
|
||||
the programmable completion functions force Readline to append a slash
|
||||
to completed names which are symbolic links to directories, subject to
|
||||
the value of the @var{mark-directories} Readline variable, regardless
|
||||
of the setting of the @var{mark-symlinked-directories} Readline variable.
|
||||
The options supplied to @code{complete} and @code{compopt}
|
||||
can control how Readline treats the completions.
|
||||
For instance, the @option{-o fullquote} option tells Readline
|
||||
to quote the matches as if they were filenames.
|
||||
See the description of @code{complete}
|
||||
(@pxref{Programmable Completion Builtins})
|
||||
for details.
|
||||
|
||||
When a compspec indicates that it wants directory name completion,
|
||||
the programmable completion functions force Readline
|
||||
to append a slash to completed names which are symbolic links
|
||||
to directories, subject to the value of the
|
||||
@var{mark-directories} Readline variable,
|
||||
regardless of the setting of the
|
||||
@var{mark-symlinked-directories} Readline variable.
|
||||
|
||||
There is some support for dynamically modifying completions.
|
||||
This is most useful when used in combination with a default completion
|
||||
@@ -2266,8 +2317,8 @@ the compspec associated with the command on which completion is being
|
||||
attempted (supplied as the first argument when the function is executed),
|
||||
programmable completion restarts from the beginning, with an
|
||||
attempt to find a new compspec for that command.
|
||||
This allows a set of completions to be built dynamically as completion
|
||||
is attempted, rather than being loaded all at once.
|
||||
This can be used to build a set of completions dynamically
|
||||
as completion is attempted, rather than loading them all at once.
|
||||
|
||||
For instance, assuming that there is a library of compspecs, each kept in a
|
||||
file corresponding to the name of the command, the following default
|
||||
@@ -2453,7 +2504,7 @@ Names of exported shell variables.
|
||||
May also be specified as @option{-e}.
|
||||
|
||||
@item file
|
||||
File names.
|
||||
File and directory names, similar to Readline's filename completion.
|
||||
May also be specified as @option{-f}.
|
||||
|
||||
@item function
|
||||
|
||||
Binary file not shown.
+133
-83
@@ -1,6 +1,6 @@
|
||||
<HTML>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<!-- Created on November, 1 2024 by texi2html 1.64 -->
|
||||
<!-- Created on December, 2 2024 by texi2html 1.64 -->
|
||||
<!--
|
||||
Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
|
||||
Karl Berry <karl@freefriends.org>
|
||||
@@ -469,19 +469,19 @@ Typing <KBD>C-s</KBD> searches forward through the history.
|
||||
The characters present in the value of the <CODE>isearch-terminators</CODE> variable
|
||||
are used to terminate an incremental search.
|
||||
If that variable has not been assigned a value, the <KBD>ESC</KBD> and
|
||||
<KBD>C-J</KBD> characters will terminate an incremental search.
|
||||
<KBD>C-g</KBD> will abort an incremental search and restore the original line.
|
||||
<KBD>C-j</KBD> characters terminate an incremental search.
|
||||
<KBD>C-g</KBD> aborts an incremental search and restores the original line.
|
||||
When the search is terminated, the history entry containing the
|
||||
search string becomes the current line.
|
||||
</P><P>
|
||||
|
||||
To find other matching entries in the history list, type <KBD>C-r</KBD> or
|
||||
<KBD>C-s</KBD> as appropriate.
|
||||
This will search backward or forward in the history for the next
|
||||
This searches backward or forward in the history for the next
|
||||
entry matching the search string typed so far.
|
||||
Any other key sequence bound to a Readline command will terminate
|
||||
the search and execute that command.
|
||||
For instance, a <KBD>RET</KBD> will terminate the search and accept
|
||||
Any other key sequence bound to a Readline command terminates
|
||||
the search and executes that command.
|
||||
For instance, a <KBD>RET</KBD> terminates the search and accepts
|
||||
the line, thereby executing the command from the history list.
|
||||
A movement command will terminate the search, make the last line found
|
||||
the current line, and begin editing.
|
||||
@@ -528,7 +528,7 @@ If that file does not exist or cannot be read, Readline looks for
|
||||
<TT>`/etc/inputrc'</TT>.
|
||||
</P><P>
|
||||
|
||||
When a program which uses the Readline library starts up, Readline reads
|
||||
When a program that uses the Readline library starts up, Readline reads
|
||||
the init file and sets any variables and key bindings it contains.
|
||||
</P><P>
|
||||
|
||||
@@ -695,7 +695,7 @@ The number of screen columns used to display possible matches
|
||||
when performing completion.
|
||||
The value is ignored if it is less than 0 or greater than the terminal
|
||||
screen width.
|
||||
A value of 0 will cause matches to be displayed one per line.
|
||||
A value of 0 causes matches to be displayed one per line.
|
||||
The default value is -1.
|
||||
<P>
|
||||
|
||||
@@ -729,8 +729,8 @@ with an ellipsis when displaying possible completions.
|
||||
The number of possible completions that determines when the user is asked
|
||||
whether the list of possibilities should be displayed.
|
||||
If the number of possible completions is greater than
|
||||
or equal to this value, Readline will ask whether or not
|
||||
the user wishes to view them;
|
||||
or equal to this value,
|
||||
Readline asks whether or not the user wishes to view them;
|
||||
otherwise, Readline simply lists the completions.
|
||||
This variable must be set to an integer value greater than or equal to zero.
|
||||
A zero value means Readline should never ask; negative
|
||||
@@ -740,11 +740,11 @@ The default limit is <CODE>100</CODE>.
|
||||
|
||||
<DT><CODE>convert-meta</CODE>
|
||||
<DD><A NAME="IDX18"></A>
|
||||
If set to <SAMP>`on'</SAMP>, Readline will convert characters it reads
|
||||
If set to <SAMP>`on'</SAMP>, Readline converts characters it reads
|
||||
that have the eighth bit set to an ASCII key sequence by
|
||||
clearing the eighth bit and prefixing an <KBD>ESC</KBD> character,
|
||||
converting them to a meta-prefixed key sequence.
|
||||
The default value is <SAMP>`on'</SAMP>, but Readline will set it to <SAMP>`off'</SAMP>
|
||||
The default value is <SAMP>`on'</SAMP>, but Readline sets it to <SAMP>`off'</SAMP>
|
||||
if the locale contains
|
||||
characters whose encodings may include bytes with the eighth bit set.
|
||||
This variable is dependent on the <CODE>LC_CTYPE</CODE> locale category, and
|
||||
@@ -755,8 +755,8 @@ see the description of <CODE>force-meta-prefix</CODE> below.
|
||||
|
||||
<DT><CODE>disable-completion</CODE>
|
||||
<DD><A NAME="IDX19"></A>
|
||||
If set to <SAMP>`On'</SAMP>, Readline will inhibit word completion.
|
||||
Completion characters will be inserted into the line as if they
|
||||
If set to <SAMP>`On'</SAMP>, Readline inhibits word completion.
|
||||
Completion characters are inserted into the line as if they
|
||||
had been mapped to <CODE>self-insert</CODE>.
|
||||
The default is <SAMP>`off'</SAMP>.
|
||||
<P>
|
||||
@@ -820,7 +820,7 @@ The default is <SAMP>`On'</SAMP>.
|
||||
|
||||
<DT><CODE>enable-keypad</CODE>
|
||||
<DD><A NAME="IDX25"></A>
|
||||
When set to <SAMP>`on'</SAMP>, Readline will try to enable the application
|
||||
When set to <SAMP>`on'</SAMP>, Readline tries to enable the application
|
||||
keypad when it is called.
|
||||
Some systems need this to enable the arrow keys.
|
||||
The default is <SAMP>`off'</SAMP>.
|
||||
@@ -828,7 +828,7 @@ The default is <SAMP>`off'</SAMP>.
|
||||
|
||||
<DT><CODE>enable-meta-key</CODE>
|
||||
<DD><A NAME="IDX26"></A>
|
||||
When set to <SAMP>`on'</SAMP>, Readline will try to enable any meta
|
||||
When set to <SAMP>`on'</SAMP>, Readline tries to enable any meta
|
||||
modifier key the terminal claims to support when it is called.
|
||||
On many terminals, the Meta key is used to send eight-bit characters;
|
||||
this variable checks for the terminal capability that indicates the
|
||||
@@ -897,10 +897,10 @@ By default, this variable is set to <SAMP>`off'</SAMP>.
|
||||
<DT><CODE>input-meta</CODE>
|
||||
<DD><A NAME="IDX32"></A>
|
||||
<A NAME="IDX33"></A>
|
||||
If set to <SAMP>`on'</SAMP>, Readline will enable eight-bit input (that is, it
|
||||
will not clear the eighth bit in the characters it reads),
|
||||
If set to <SAMP>`on'</SAMP>, Readline enables eight-bit input (that is, it
|
||||
does not clear the eighth bit in the characters it reads),
|
||||
regardless of what the terminal claims it can support.
|
||||
The default value is <SAMP>`off'</SAMP>, but Readline will set it to <SAMP>`on'</SAMP>
|
||||
The default value is <SAMP>`off'</SAMP>, but Readline sets it to <SAMP>`on'</SAMP>
|
||||
if the locale contains characters whose encodings may include bytes
|
||||
with the eighth bit set.
|
||||
This variable is dependent on the <CODE>LC_CTYPE</CODE> locale category, and
|
||||
@@ -913,7 +913,7 @@ The name <CODE>meta-flag</CODE> is a synonym for <CODE>input-meta</CODE>.
|
||||
The string of characters that should terminate an incremental search without
|
||||
subsequently executing the character as a command (see section <A HREF="rluserman.html#SEC8">1.2.5 Searching for Commands in the History</A>).
|
||||
If this variable has not been given a value, the characters <KBD>ESC</KBD> and
|
||||
<KBD>C-J</KBD> will terminate an incremental search.
|
||||
<KBD>C-j</KBD> terminate an incremental search.
|
||||
<P>
|
||||
|
||||
<DT><CODE>keymap</CODE>
|
||||
@@ -941,14 +941,14 @@ default keymap.
|
||||
reading an ambiguous key sequence
|
||||
(one that can form a complete key sequence using the input read so far,
|
||||
or can take additional input to complete a longer key sequence).
|
||||
If Readline doesn't receive any input within the timeout, it will use the
|
||||
If Readline doesn't receive any input within the timeout, it uses the
|
||||
shorter but complete key sequence.
|
||||
Readline uses this value to determine whether or not input is
|
||||
available on the current input source (<CODE>rl_instream</CODE> by default).
|
||||
The value is specified in milliseconds, so a value of 1000 means that
|
||||
Readline will wait one second for additional input.
|
||||
If this variable is set to a value less than or equal to zero, or to a
|
||||
non-numeric value, Readline will wait until another key is pressed to
|
||||
non-numeric value, Readline waits until another key is pressed to
|
||||
decide which key sequence to complete.
|
||||
The default value is <CODE>500</CODE>.
|
||||
<P>
|
||||
@@ -960,7 +960,7 @@ The default is <SAMP>`on'</SAMP>.
|
||||
|
||||
<DT><CODE>mark-modified-lines</CODE>
|
||||
<DD><A NAME="IDX36"></A>
|
||||
When this variable is set to <SAMP>`on'</SAMP>, Readline will to display an
|
||||
When this variable is set to <SAMP>`on'</SAMP>, Readline displays an
|
||||
asterisk (<SAMP>`*'</SAMP>) at the start of history lines which have been modified.
|
||||
This variable is <SAMP>`off'</SAMP> by default.
|
||||
<P>
|
||||
@@ -992,10 +992,10 @@ The default is <SAMP>`off'</SAMP>.
|
||||
|
||||
<DT><CODE>output-meta</CODE>
|
||||
<DD><A NAME="IDX40"></A>
|
||||
If set to <SAMP>`on'</SAMP>, Readline will display characters with the
|
||||
If set to <SAMP>`on'</SAMP>, Readline displays characters with the
|
||||
eighth bit set directly rather than as a meta-prefixed escape
|
||||
sequence.
|
||||
The default is <SAMP>`off'</SAMP>, but Readline will set it to <SAMP>`on'</SAMP>
|
||||
The default is <SAMP>`off'</SAMP>, but Readline sets it to <SAMP>`on'</SAMP>
|
||||
if the locale contains characters whose encodings may include
|
||||
bytes with the eighth bit set.
|
||||
This variable is dependent on the <CODE>LC_CTYPE</CODE> locale category, and
|
||||
@@ -1004,7 +1004,8 @@ its value may change if the locale changes.
|
||||
|
||||
<DT><CODE>page-completions</CODE>
|
||||
<DD><A NAME="IDX41"></A>
|
||||
If set to <SAMP>`on'</SAMP>, Readline uses an internal <CODE>more</CODE>-like pager
|
||||
If set to <SAMP>`on'</SAMP>, Readline uses an internal pager resembling
|
||||
<I>more</I>(1)
|
||||
to display a screenful of possible completions at a time.
|
||||
This variable is <SAMP>`on'</SAMP> by default.
|
||||
<P>
|
||||
@@ -1014,7 +1015,7 @@ This variable is <SAMP>`on'</SAMP> by default.
|
||||
<P>
|
||||
|
||||
<DT><CODE>print-completions-horizontally</CODE>
|
||||
<DD>If set to <SAMP>`on'</SAMP>, Readline will display completions with matches
|
||||
<DD>If set to <SAMP>`on'</SAMP>, Readline displays completions with matches
|
||||
sorted horizontally in alphabetical order, rather than down the screen.
|
||||
The default is <SAMP>`off'</SAMP>.
|
||||
<P>
|
||||
@@ -1167,7 +1168,8 @@ This key binding syntax recognizes a number of symbolic character names:
|
||||
<VAR>NEWLINE</VAR>,
|
||||
<VAR>RET</VAR>,
|
||||
<VAR>RETURN</VAR>,
|
||||
<VAR>RUBOUT</VAR> (a destructive backspace),
|
||||
<VAR>RUBOUT</VAR>
|
||||
(a destructive backspace),
|
||||
<VAR>SPACE</VAR>,
|
||||
<VAR>SPC</VAR>,
|
||||
and
|
||||
@@ -1600,12 +1602,14 @@ This may also be bound to the End key on some keyboards.
|
||||
<DT><CODE>forward-char (C-f)</CODE>
|
||||
<DD><A NAME="IDX56"></A>
|
||||
Move forward a character.
|
||||
This may also be bound to the right arrow key on some keyboards.
|
||||
<P>
|
||||
|
||||
<A NAME="IDX57"></A>
|
||||
<DT><CODE>backward-char (C-b)</CODE>
|
||||
<DD><A NAME="IDX58"></A>
|
||||
Move back a character.
|
||||
This may also be bound to the left arrow key on some keyboards.
|
||||
<P>
|
||||
|
||||
<A NAME="IDX59"></A>
|
||||
@@ -1701,12 +1705,14 @@ to its original state.
|
||||
<DT><CODE>previous-history (C-p)</CODE>
|
||||
<DD><A NAME="IDX76"></A>
|
||||
Move `back' through the history list, fetching the previous command.
|
||||
This may also be bound to the up arrow key on some keyboards.
|
||||
<P>
|
||||
|
||||
<A NAME="IDX77"></A>
|
||||
<DT><CODE>next-history (C-n)</CODE>
|
||||
<DD><A NAME="IDX78"></A>
|
||||
Move `forward' through the history list, fetching the next command.
|
||||
This may also be bound to the down arrow key on some keyboards.
|
||||
<P>
|
||||
|
||||
<A NAME="IDX79"></A>
|
||||
@@ -2266,8 +2272,50 @@ This command is unbound by default.
|
||||
<P>
|
||||
|
||||
<A NAME="IDX179"></A>
|
||||
<DT><CODE>delete-char-or-list ()</CODE>
|
||||
<DT><CODE>export-completions ()</CODE>
|
||||
<DD><A NAME="IDX180"></A>
|
||||
Perform completion on the word before point as described above
|
||||
and write the list of possible completions to Readline's output stream
|
||||
using the following format, writing information on separate lines:
|
||||
<P>
|
||||
|
||||
<UL>
|
||||
<A NAME="IDX181"></A>
|
||||
<LI>
|
||||
the number of matches <VAR>N</VAR>;
|
||||
<A NAME="IDX182"></A>
|
||||
<LI>
|
||||
the word being completed;
|
||||
<A NAME="IDX183"></A>
|
||||
<LI>
|
||||
<VAR>S</VAR>:<VAR>E</VAR>,
|
||||
where S and E are the start and end offsets of the word
|
||||
in the Readline line buffer; then
|
||||
<A NAME="IDX184"></A>
|
||||
<LI>
|
||||
each match, one per line
|
||||
</UL>
|
||||
<P>
|
||||
|
||||
If there are no matches, the first line will be "0",
|
||||
and this command does not print any output after the <VAR>S</VAR>:<VAR>E</VAR>.
|
||||
If there is only a single match, this prints a single line containing it.
|
||||
If there is more than one match, this prints the common prefix of the
|
||||
matches, which may be empty, on the first line after the <VAR>S</VAR>:<VAR>E</VAR>,
|
||||
then the matches on subsequent lines.
|
||||
In this case, <VAR>N</VAR> will include the first line with the common prefix.
|
||||
</P><P>
|
||||
|
||||
The user or application
|
||||
should be able to accommodate the possibility of a blank line.
|
||||
The intent is that the user or application reads <VAR>N</VAR> lines after
|
||||
the line containing <VAR>S</VAR>:<VAR>E</VAR> to obtain the match list.
|
||||
This command is unbound by default.
|
||||
</P><P>
|
||||
|
||||
<A NAME="IDX185"></A>
|
||||
<DT><CODE>delete-char-or-list ()</CODE>
|
||||
<DD><A NAME="IDX186"></A>
|
||||
Deletes the character under the cursor if not at the beginning or
|
||||
end of the line (like <CODE>delete-char</CODE>).
|
||||
At the end of the line, it behaves identically to <CODE>possible-completions</CODE>.
|
||||
@@ -2295,29 +2343,29 @@ This command is unbound by default.
|
||||
<!--docid::SEC20::-->
|
||||
<DL COMPACT>
|
||||
|
||||
<A NAME="IDX181"></A>
|
||||
<A NAME="IDX187"></A>
|
||||
<DT><CODE>start-kbd-macro (C-x ()</CODE>
|
||||
<DD><A NAME="IDX182"></A>
|
||||
<DD><A NAME="IDX188"></A>
|
||||
Begin saving the characters typed into the current keyboard macro.
|
||||
<P>
|
||||
|
||||
<A NAME="IDX183"></A>
|
||||
<A NAME="IDX189"></A>
|
||||
<DT><CODE>end-kbd-macro (C-x ))</CODE>
|
||||
<DD><A NAME="IDX184"></A>
|
||||
<DD><A NAME="IDX190"></A>
|
||||
Stop saving the characters typed into the current keyboard macro
|
||||
and save the definition.
|
||||
<P>
|
||||
|
||||
<A NAME="IDX185"></A>
|
||||
<A NAME="IDX191"></A>
|
||||
<DT><CODE>call-last-kbd-macro (C-x e)</CODE>
|
||||
<DD><A NAME="IDX186"></A>
|
||||
<DD><A NAME="IDX192"></A>
|
||||
Re-execute the last keyboard macro defined, by making the characters
|
||||
in the macro appear as if typed at the keyboard.
|
||||
<P>
|
||||
|
||||
<A NAME="IDX187"></A>
|
||||
<A NAME="IDX193"></A>
|
||||
<DT><CODE>print-last-kbd-macro ()</CODE>
|
||||
<DD><A NAME="IDX188"></A>
|
||||
<DD><A NAME="IDX194"></A>
|
||||
Print the last keyboard macro defined in a format suitable for the
|
||||
<VAR>inputrc</VAR> file.
|
||||
<P>
|
||||
@@ -2343,101 +2391,103 @@ Print the last keyboard macro defined in a format suitable for the
|
||||
<!--docid::SEC21::-->
|
||||
<DL COMPACT>
|
||||
|
||||
<A NAME="IDX189"></A>
|
||||
<A NAME="IDX195"></A>
|
||||
<DT><CODE>re-read-init-file (C-x C-r)</CODE>
|
||||
<DD><A NAME="IDX190"></A>
|
||||
<DD><A NAME="IDX196"></A>
|
||||
Read in the contents of the <VAR>inputrc</VAR> file, and incorporate
|
||||
any bindings or variable assignments found there.
|
||||
<P>
|
||||
|
||||
<A NAME="IDX191"></A>
|
||||
<A NAME="IDX197"></A>
|
||||
<DT><CODE>abort (C-g)</CODE>
|
||||
<DD><A NAME="IDX192"></A>
|
||||
<DD><A NAME="IDX198"></A>
|
||||
Abort the current editing command and
|
||||
ring the terminal's bell (subject to the setting of
|
||||
<CODE>bell-style</CODE>).
|
||||
<P>
|
||||
|
||||
<A NAME="IDX193"></A>
|
||||
<A NAME="IDX199"></A>
|
||||
<DT><CODE>do-lowercase-version (M-A, M-B, M-<VAR>x</VAR>, <small>...</small>)</CODE>
|
||||
<DD><A NAME="IDX194"></A>
|
||||
<DD><A NAME="IDX200"></A>
|
||||
If the metafied character <VAR>x</VAR> is upper case, run the command
|
||||
that is bound to the corresponding metafied lower case character.
|
||||
The behavior is undefined if <VAR>x</VAR> is already lower case.
|
||||
<P>
|
||||
|
||||
<A NAME="IDX195"></A>
|
||||
<A NAME="IDX201"></A>
|
||||
<DT><CODE>prefix-meta (<KBD>ESC</KBD>)</CODE>
|
||||
<DD><A NAME="IDX196"></A>
|
||||
<DD><A NAME="IDX202"></A>
|
||||
Metafy the next character typed.
|
||||
Typing <SAMP>`<KBD>ESC</KBD> f'</SAMP> is equivalent to typing <KBD>M-f</KBD>.
|
||||
<P>
|
||||
|
||||
<A NAME="IDX197"></A>
|
||||
<A NAME="IDX203"></A>
|
||||
<DT><CODE>undo (C-_ or C-x C-u)</CODE>
|
||||
<DD><A NAME="IDX198"></A>
|
||||
<DD><A NAME="IDX204"></A>
|
||||
Incremental undo, separately remembered for each line.
|
||||
<P>
|
||||
|
||||
<A NAME="IDX199"></A>
|
||||
<A NAME="IDX205"></A>
|
||||
<DT><CODE>revert-line (M-r)</CODE>
|
||||
<DD><A NAME="IDX200"></A>
|
||||
<DD><A NAME="IDX206"></A>
|
||||
Undo all changes made to this line.
|
||||
This is like executing the <CODE>undo</CODE>
|
||||
command enough times to get back to the initial state.
|
||||
<P>
|
||||
|
||||
<A NAME="IDX201"></A>
|
||||
<A NAME="IDX207"></A>
|
||||
<DT><CODE>tilde-expand (M-~)</CODE>
|
||||
<DD><A NAME="IDX202"></A>
|
||||
<DD><A NAME="IDX208"></A>
|
||||
Perform tilde expansion on the current word.
|
||||
<P>
|
||||
|
||||
<A NAME="IDX203"></A>
|
||||
<A NAME="IDX209"></A>
|
||||
<DT><CODE>set-mark (C-@)</CODE>
|
||||
<DD><A NAME="IDX204"></A>
|
||||
<DD><A NAME="IDX210"></A>
|
||||
Set the mark to the point.
|
||||
If a numeric argument is supplied, set the mark to that position.
|
||||
<P>
|
||||
|
||||
<A NAME="IDX205"></A>
|
||||
<A NAME="IDX211"></A>
|
||||
<DT><CODE>exchange-point-and-mark (C-x C-x)</CODE>
|
||||
<DD><A NAME="IDX206"></A>
|
||||
<DD><A NAME="IDX212"></A>
|
||||
Swap the point with the mark.
|
||||
Set the current cursor position to the saved position,
|
||||
then set the mark to the old cursor position.
|
||||
<P>
|
||||
|
||||
<A NAME="IDX207"></A>
|
||||
<A NAME="IDX213"></A>
|
||||
<DT><CODE>character-search (C-])</CODE>
|
||||
<DD><A NAME="IDX208"></A>
|
||||
<DD><A NAME="IDX214"></A>
|
||||
Read a character and move point to the next occurrence of that character.
|
||||
A negative argument searches for previous occurrences.
|
||||
<P>
|
||||
|
||||
<A NAME="IDX209"></A>
|
||||
<A NAME="IDX215"></A>
|
||||
<DT><CODE>character-search-backward (M-C-])</CODE>
|
||||
<DD><A NAME="IDX210"></A>
|
||||
<DD><A NAME="IDX216"></A>
|
||||
Read a character and move point to the previous occurrence of that character.
|
||||
A negative argument searches for subsequent occurrences.
|
||||
<P>
|
||||
|
||||
<A NAME="IDX211"></A>
|
||||
<A NAME="IDX217"></A>
|
||||
<DT><CODE>skip-csi-sequence ()</CODE>
|
||||
<DD><A NAME="IDX212"></A>
|
||||
<DD><A NAME="IDX218"></A>
|
||||
Read enough characters to consume a multi-key sequence such as those
|
||||
defined for keys like Home and End.
|
||||
CSI sequences begin with a Control Sequence Indicator (CSI), usually ESC-[.
|
||||
CSI sequences begin with a Control Sequence Indicator (CSI), usually
|
||||
<KBD>ESC [</KBD>.
|
||||
If this sequence is bound to "\e[",
|
||||
keys producing CSI sequences will have no effect
|
||||
unless explicitly bound to a Readline command, instead of inserting
|
||||
stray characters into the editing buffer.
|
||||
This is unbound by default, but usually bound to ESC-[.
|
||||
keys producing CSI sequences have no effect
|
||||
unless explicitly bound to a Readline command,
|
||||
instead of inserting stray characters into the editing buffer.
|
||||
This is unbound by default, but usually bound to
|
||||
<KBD>ESC [</KBD>.
|
||||
<P>
|
||||
|
||||
<A NAME="IDX213"></A>
|
||||
<A NAME="IDX219"></A>
|
||||
<DT><CODE>insert-comment (M-#)</CODE>
|
||||
<DD><A NAME="IDX214"></A>
|
||||
<DD><A NAME="IDX220"></A>
|
||||
Without a numeric argument, insert the value of the <CODE>comment-begin</CODE>
|
||||
variable at the beginning of the current line.
|
||||
If a numeric argument is supplied, this command acts as a toggle: if
|
||||
@@ -2447,9 +2497,9 @@ the characters in <CODE>comment-begin</CODE> from the beginning of the line.
|
||||
In either case, the line is accepted as if a newline had been typed.
|
||||
<P>
|
||||
|
||||
<A NAME="IDX215"></A>
|
||||
<A NAME="IDX221"></A>
|
||||
<DT><CODE>dump-functions ()</CODE>
|
||||
<DD><A NAME="IDX216"></A>
|
||||
<DD><A NAME="IDX222"></A>
|
||||
Print all of the functions and their key bindings
|
||||
to the Readline output stream.
|
||||
If a numeric argument is supplied,
|
||||
@@ -2458,9 +2508,9 @@ of an <VAR>inputrc</VAR> file.
|
||||
This command is unbound by default.
|
||||
<P>
|
||||
|
||||
<A NAME="IDX217"></A>
|
||||
<A NAME="IDX223"></A>
|
||||
<DT><CODE>dump-variables ()</CODE>
|
||||
<DD><A NAME="IDX218"></A>
|
||||
<DD><A NAME="IDX224"></A>
|
||||
Print all of the settable variables and their values
|
||||
to the Readline output stream.
|
||||
If a numeric argument is supplied,
|
||||
@@ -2469,9 +2519,9 @@ of an <VAR>inputrc</VAR> file.
|
||||
This command is unbound by default.
|
||||
<P>
|
||||
|
||||
<A NAME="IDX219"></A>
|
||||
<A NAME="IDX225"></A>
|
||||
<DT><CODE>dump-macros ()</CODE>
|
||||
<DD><A NAME="IDX220"></A>
|
||||
<DD><A NAME="IDX226"></A>
|
||||
Print all of the Readline key sequences bound to macros and the
|
||||
strings they output
|
||||
to the Readline output stream.
|
||||
@@ -2481,9 +2531,9 @@ of an <VAR>inputrc</VAR> file.
|
||||
This command is unbound by default.
|
||||
<P>
|
||||
|
||||
<A NAME="IDX221"></A>
|
||||
<A NAME="IDX227"></A>
|
||||
<DT><CODE>execute-named-command (M-x)</CODE>
|
||||
<DD><A NAME="IDX222"></A>
|
||||
<DD><A NAME="IDX228"></A>
|
||||
Read a bindable Readline command name from the input and execute the
|
||||
function to which it's bound, as if the key sequence to which it was
|
||||
bound appeared in the input.
|
||||
@@ -2491,16 +2541,16 @@ If this function is supplied with a numeric argument, it passes that
|
||||
argument to the function it executes.
|
||||
<P>
|
||||
|
||||
<A NAME="IDX223"></A>
|
||||
<A NAME="IDX229"></A>
|
||||
<DT><CODE>emacs-editing-mode (C-e)</CODE>
|
||||
<DD><A NAME="IDX224"></A>
|
||||
<DD><A NAME="IDX230"></A>
|
||||
When in <CODE>vi</CODE> command mode, this causes a switch to <CODE>emacs</CODE>
|
||||
editing mode.
|
||||
<P>
|
||||
|
||||
<A NAME="IDX225"></A>
|
||||
<A NAME="IDX231"></A>
|
||||
<DT><CODE>vi-editing-mode (M-C-j)</CODE>
|
||||
<DD><A NAME="IDX226"></A>
|
||||
<DD><A NAME="IDX232"></A>
|
||||
When in <CODE>emacs</CODE> editing mode, this causes a switch to <CODE>vi</CODE>
|
||||
editing mode.
|
||||
<P>
|
||||
@@ -3228,7 +3278,7 @@ to permit their use in free software.
|
||||
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="rluserman.html#SEC_About"> ? </A>]</TD>
|
||||
</TR></TABLE>
|
||||
<H1>About this document</H1>
|
||||
This document was generated by <I>Chet Ramey</I> on <I>November, 1 2024</I>
|
||||
This document was generated by <I>Chet Ramey</I> on <I>December, 2 2024</I>
|
||||
using <A HREF="http://www.mathematik.uni-kl.de/~obachman/Texi2html
|
||||
"><I>texi2html</I></A>
|
||||
<P></P>
|
||||
@@ -3390,7 +3440,7 @@ the following structure:
|
||||
<BR>
|
||||
<FONT SIZE="-1">
|
||||
This document was generated
|
||||
by <I>Chet Ramey</I> on <I>November, 1 2024</I>
|
||||
by <I>Chet Ramey</I> on <I>December, 2 2024</I>
|
||||
using <A HREF="http://www.mathematik.uni-kl.de/~obachman/Texi2html
|
||||
"><I>texi2html</I></A>
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ This is rluserman.info, produced by makeinfo version 7.1 from
|
||||
rluserman.texi.
|
||||
|
||||
This manual describes the end user interface of the GNU Readline Library
|
||||
(version 8.3, 15 November 2024), a library which aids in the consistency
|
||||
(version 8.3, 29 November 2024), a library which aids in the consistency
|
||||
of user interface across discrete programs which provide a command line
|
||||
interface.
|
||||
|
||||
@@ -290,19 +290,19 @@ mode, type ‘C-r’ to search backward in the history for a particular
|
||||
string. Typing ‘C-s’ searches forward through the history. The
|
||||
characters present in the value of the ‘isearch-terminators’ variable
|
||||
are used to terminate an incremental search. If that variable has not
|
||||
been assigned a value, the <ESC> and ‘C-J’ characters will terminate an
|
||||
incremental search. ‘C-g’ will abort an incremental search and restore
|
||||
the original line. When the search is terminated, the history entry
|
||||
been assigned a value, the <ESC> and ‘C-j’ characters terminate an
|
||||
incremental search. ‘C-g’ aborts an incremental search and restores the
|
||||
original line. When the search is terminated, the history entry
|
||||
containing the search string becomes the current line.
|
||||
|
||||
To find other matching entries in the history list, type ‘C-r’ or
|
||||
‘C-s’ as appropriate. This will search backward or forward in the
|
||||
history for the next entry matching the search string typed so far. Any
|
||||
other key sequence bound to a Readline command will terminate the search
|
||||
and execute that command. For instance, a <RET> will terminate the
|
||||
search and accept the line, thereby executing the command from the
|
||||
history list. A movement command will terminate the search, make the
|
||||
last line found the current line, and begin editing.
|
||||
‘C-s’ as appropriate. This searches backward or forward in the history
|
||||
for the next entry matching the search string typed so far. Any other
|
||||
key sequence bound to a Readline command terminates the search and
|
||||
executes that command. For instance, a <RET> terminates the search and
|
||||
accepts the line, thereby executing the command from the history list.
|
||||
A movement command will terminate the search, make the last line found
|
||||
the current line, and begin editing.
|
||||
|
||||
Readline remembers the last incremental search string. If two ‘C-r’s
|
||||
are typed without any intervening characters defining a new search
|
||||
@@ -327,7 +327,7 @@ environment variable ‘INPUTRC’. If that variable is unset, the default
|
||||
is ‘~/.inputrc’. If that file does not exist or cannot be read,
|
||||
Readline looks for ‘/etc/inputrc’.
|
||||
|
||||
When a program which uses the Readline library starts up, Readline
|
||||
When a program that uses the Readline library starts up, Readline
|
||||
reads the init file and sets any variables and key bindings it contains.
|
||||
|
||||
In addition, the ‘C-x C-r’ command re-reads this init file, thus
|
||||
@@ -443,8 +443,8 @@ Variable Settings
|
||||
The number of screen columns used to display possible matches
|
||||
when performing completion. The value is ignored if it is
|
||||
less than 0 or greater than the terminal screen width. A
|
||||
value of 0 will cause matches to be displayed one per line.
|
||||
The default value is -1.
|
||||
value of 0 causes matches to be displayed one per line. The
|
||||
default value is -1.
|
||||
|
||||
‘completion-ignore-case’
|
||||
If set to ‘on’, Readline performs filename matching and
|
||||
@@ -468,19 +468,19 @@ Variable Settings
|
||||
The number of possible completions that determines when the
|
||||
user is asked whether the list of possibilities should be
|
||||
displayed. If the number of possible completions is greater
|
||||
than or equal to this value, Readline will ask whether or not
|
||||
the user wishes to view them; otherwise, Readline simply lists
|
||||
the completions. This variable must be set to an integer
|
||||
value greater than or equal to zero. A zero value means
|
||||
Readline should never ask; negative values are treated as
|
||||
zero. The default limit is ‘100’.
|
||||
than or equal to this value, Readline asks whether or not the
|
||||
user wishes to view them; otherwise, Readline simply lists the
|
||||
completions. This variable must be set to an integer value
|
||||
greater than or equal to zero. A zero value means Readline
|
||||
should never ask; negative values are treated as zero. The
|
||||
default limit is ‘100’.
|
||||
|
||||
‘convert-meta’
|
||||
If set to ‘on’, Readline will convert characters it reads that
|
||||
If set to ‘on’, Readline converts characters it reads that
|
||||
have the eighth bit set to an ASCII key sequence by clearing
|
||||
the eighth bit and prefixing an <ESC> character, converting
|
||||
them to a meta-prefixed key sequence. The default value is
|
||||
‘on’, but Readline will set it to ‘off’ if the locale contains
|
||||
‘on’, but Readline sets it to ‘off’ if the locale contains
|
||||
characters whose encodings may include bytes with the eighth
|
||||
bit set. This variable is dependent on the ‘LC_CTYPE’ locale
|
||||
category, and may change if the locale changes. This variable
|
||||
@@ -488,9 +488,9 @@ Variable Settings
|
||||
‘force-meta-prefix’ below.
|
||||
|
||||
‘disable-completion’
|
||||
If set to ‘On’, Readline will inhibit word completion.
|
||||
Completion characters will be inserted into the line as if
|
||||
they had been mapped to ‘self-insert’. The default is ‘off’.
|
||||
If set to ‘On’, Readline inhibits word completion. Completion
|
||||
characters are inserted into the line as if they had been
|
||||
mapped to ‘self-insert’. The default is ‘off’.
|
||||
|
||||
‘echo-control-characters’
|
||||
When set to ‘on’, on operating systems that indicate they
|
||||
@@ -536,18 +536,18 @@ Variable Settings
|
||||
appearing in the pasted text. The default is ‘On’.
|
||||
|
||||
‘enable-keypad’
|
||||
When set to ‘on’, Readline will try to enable the application
|
||||
When set to ‘on’, Readline tries to enable the application
|
||||
keypad when it is called. Some systems need this to enable
|
||||
the arrow keys. The default is ‘off’.
|
||||
|
||||
‘enable-meta-key’
|
||||
When set to ‘on’, Readline will try to enable any meta
|
||||
modifier key the terminal claims to support when it is called.
|
||||
On many terminals, the Meta key is used to send eight-bit
|
||||
characters; this variable checks for the terminal capability
|
||||
that indicates the terminal can enable and disable a mode that
|
||||
sets the eighth bit of a character (0200) if the Meta key is
|
||||
held down when the character is typed (a meta character). The
|
||||
When set to ‘on’, Readline tries to enable any meta modifier
|
||||
key the terminal claims to support when it is called. On many
|
||||
terminals, the Meta key is used to send eight-bit characters;
|
||||
this variable checks for the terminal capability that
|
||||
indicates the terminal can enable and disable a mode that sets
|
||||
the eighth bit of a character (0200) if the Meta key is held
|
||||
down when the character is typed (a meta character). The
|
||||
default is ‘on’.
|
||||
|
||||
‘expand-tilde’
|
||||
@@ -591,22 +591,22 @@ Variable Settings
|
||||
default, this variable is set to ‘off’.
|
||||
|
||||
‘input-meta’
|
||||
If set to ‘on’, Readline will enable eight-bit input (that is,
|
||||
it will not clear the eighth bit in the characters it reads),
|
||||
If set to ‘on’, Readline enables eight-bit input (that is, it
|
||||
does not clear the eighth bit in the characters it reads),
|
||||
regardless of what the terminal claims it can support. The
|
||||
default value is ‘off’, but Readline will set it to ‘on’ if
|
||||
the locale contains characters whose encodings may include
|
||||
bytes with the eighth bit set. This variable is dependent on
|
||||
the ‘LC_CTYPE’ locale category, and its value may change if
|
||||
the locale changes. The name ‘meta-flag’ is a synonym for
|
||||
default value is ‘off’, but Readline sets it to ‘on’ if the
|
||||
locale contains characters whose encodings may include bytes
|
||||
with the eighth bit set. This variable is dependent on the
|
||||
‘LC_CTYPE’ locale category, and its value may change if the
|
||||
locale changes. The name ‘meta-flag’ is a synonym for
|
||||
‘input-meta’.
|
||||
|
||||
‘isearch-terminators’
|
||||
The string of characters that should terminate an incremental
|
||||
search without subsequently executing the character as a
|
||||
command (*note Searching::). If this variable has not been
|
||||
given a value, the characters <ESC> and ‘C-J’ will terminate
|
||||
an incremental search.
|
||||
given a value, the characters <ESC> and ‘C-j’ terminate an
|
||||
incremental search.
|
||||
|
||||
‘keymap’
|
||||
Sets Readline's idea of the current keymap for key binding
|
||||
@@ -623,23 +623,23 @@ Variable Settings
|
||||
reading an ambiguous key sequence (one that can form a
|
||||
complete key sequence using the input read so far, or can take
|
||||
additional input to complete a longer key sequence). If
|
||||
Readline doesn't receive any input within the timeout, it will
|
||||
use the shorter but complete key sequence. Readline uses this
|
||||
Readline doesn't receive any input within the timeout, it uses
|
||||
the shorter but complete key sequence. Readline uses this
|
||||
value to determine whether or not input is available on the
|
||||
current input source (‘rl_instream’ by default). The value is
|
||||
specified in milliseconds, so a value of 1000 means that
|
||||
Readline will wait one second for additional input. If this
|
||||
variable is set to a value less than or equal to zero, or to a
|
||||
non-numeric value, Readline will wait until another key is
|
||||
pressed to decide which key sequence to complete. The default
|
||||
value is ‘500’.
|
||||
non-numeric value, Readline waits until another key is pressed
|
||||
to decide which key sequence to complete. The default value
|
||||
is ‘500’.
|
||||
|
||||
‘mark-directories’
|
||||
If set to ‘on’, completed directory names have a slash
|
||||
appended. The default is ‘on’.
|
||||
|
||||
‘mark-modified-lines’
|
||||
When this variable is set to ‘on’, Readline will to display an
|
||||
When this variable is set to ‘on’, Readline displays an
|
||||
asterisk (‘*’) at the start of history lines which have been
|
||||
modified. This variable is ‘off’ by default.
|
||||
|
||||
@@ -661,24 +661,24 @@ Variable Settings
|
||||
cycling through the list. The default is ‘off’.
|
||||
|
||||
‘output-meta’
|
||||
If set to ‘on’, Readline will display characters with the
|
||||
eighth bit set directly rather than as a meta-prefixed escape
|
||||
sequence. The default is ‘off’, but Readline will set it to
|
||||
‘on’ if the locale contains characters whose encodings may
|
||||
include bytes with the eighth bit set. This variable is
|
||||
dependent on the ‘LC_CTYPE’ locale category, and its value may
|
||||
change if the locale changes.
|
||||
If set to ‘on’, Readline displays characters with the eighth
|
||||
bit set directly rather than as a meta-prefixed escape
|
||||
sequence. The default is ‘off’, but Readline sets it to ‘on’
|
||||
if the locale contains characters whose encodings may include
|
||||
bytes with the eighth bit set. This variable is dependent on
|
||||
the ‘LC_CTYPE’ locale category, and its value may change if
|
||||
the locale changes.
|
||||
|
||||
‘page-completions’
|
||||
If set to ‘on’, Readline uses an internal ‘more’-like pager to
|
||||
display a screenful of possible completions at a time. This
|
||||
variable is ‘on’ by default.
|
||||
If set to ‘on’, Readline uses an internal pager resembling
|
||||
more(1) to display a screenful of possible completions at a
|
||||
time. This variable is ‘on’ by default.
|
||||
|
||||
‘prefer-visible-bell’
|
||||
See ‘bell-style’.
|
||||
|
||||
‘print-completions-horizontally’
|
||||
If set to ‘on’, Readline will display completions with matches
|
||||
If set to ‘on’, Readline displays completions with matches
|
||||
sorted horizontally in alphabetical order, rather than down
|
||||
the screen. The default is ‘off’.
|
||||
|
||||
@@ -1107,10 +1107,12 @@ File: rluserman.info, Node: Commands For Moving, Next: Commands For History,
|
||||
on some keyboards.
|
||||
|
||||
‘forward-char (C-f)’
|
||||
Move forward a character.
|
||||
Move forward a character. This may also be bound to the right
|
||||
arrow key on some keyboards.
|
||||
|
||||
‘backward-char (C-b)’
|
||||
Move back a character.
|
||||
Move back a character. This may also be bound to the left arrow
|
||||
key on some keyboards.
|
||||
|
||||
‘forward-word (M-f)’
|
||||
Move forward to the end of the next word. Words are composed of
|
||||
@@ -1160,10 +1162,12 @@ File: rluserman.info, Node: Commands For History, Next: Commands For Text, Pr
|
||||
|
||||
‘previous-history (C-p)’
|
||||
Move 'back' through the history list, fetching the previous
|
||||
command.
|
||||
command. This may also be bound to the up arrow key on some
|
||||
keyboards.
|
||||
|
||||
‘next-history (C-n)’
|
||||
Move 'forward' through the history list, fetching the next command.
|
||||
This may also be bound to the down arrow key on some keyboards.
|
||||
|
||||
‘beginning-of-history (M-<)’
|
||||
Move to the first line in the history.
|
||||
@@ -1480,19 +1484,19 @@ File: rluserman.info, Node: Commands For Completion, Next: Keyboard Macros, P
|
||||
write the list of possible completions to Readline's output stream
|
||||
using the following format, writing information on separate lines:
|
||||
|
||||
The number of matches;
|
||||
The word being completed;
|
||||
S:E, where S and E are the start and end offsets of the word
|
||||
in the readline line buffer; then
|
||||
Each match, one per line
|
||||
• the number of matches N;
|
||||
• the word being completed;
|
||||
• S:E, where S and E are the start and end offsets of the word
|
||||
in the Readline line buffer; then
|
||||
• each match, one per line
|
||||
|
||||
If there are no matches, the first line will be 0, and this command
|
||||
will not print any output after the S:E. If there is only a single
|
||||
match, this prints a single line containing it. If there is more
|
||||
than one match, this prints the common prefix of the matches, which
|
||||
may be empty, on the first line after the S:E, then the matches on
|
||||
subsequent lines. In this case, N will include the first line with
|
||||
the common prefix.
|
||||
If there are no matches, the first line will be "0", and this
|
||||
command does not print any output after the S:E. If there is only
|
||||
a single match, this prints a single line containing it. If there
|
||||
is more than one match, this prints the common prefix of the
|
||||
matches, which may be empty, on the first line after the S:E, then
|
||||
the matches on subsequent lines. In this case, N will include the
|
||||
first line with the common prefix.
|
||||
|
||||
The user or application should be able to accommodate the
|
||||
possibility of a blank line. The intent is that the user or
|
||||
@@ -1579,11 +1583,11 @@ File: rluserman.info, Node: Miscellaneous Commands, Prev: Keyboard Macros, Up
|
||||
‘skip-csi-sequence ()’
|
||||
Read enough characters to consume a multi-key sequence such as
|
||||
those defined for keys like Home and End. CSI sequences begin with
|
||||
a Control Sequence Indicator (CSI), usually ESC-[. If this
|
||||
sequence is bound to "\e[", keys producing CSI sequences will have
|
||||
no effect unless explicitly bound to a Readline command, instead of
|
||||
a Control Sequence Indicator (CSI), usually ‘ESC [’. If this
|
||||
sequence is bound to "\e[", keys producing CSI sequences have no
|
||||
effect unless explicitly bound to a Readline command, instead of
|
||||
inserting stray characters into the editing buffer. This is
|
||||
unbound by default, but usually bound to ESC-[.
|
||||
unbound by default, but usually bound to ‘ESC [’.
|
||||
|
||||
‘insert-comment (M-#)’
|
||||
Without a numeric argument, insert the value of the ‘comment-begin’
|
||||
@@ -2144,21 +2148,21 @@ Node: Readline Movement Commands7446
|
||||
Node: Readline Killing Commands8447
|
||||
Node: Readline Arguments10475
|
||||
Node: Searching11537
|
||||
Node: Readline Init File13769
|
||||
Node: Readline Init File Syntax14968
|
||||
Node: Conditional Init Constructs41361
|
||||
Node: Sample Init File45751
|
||||
Node: Bindable Readline Commands48877
|
||||
Node: Commands For Moving50262
|
||||
Node: Commands For History52193
|
||||
Node: Commands For Text57399
|
||||
Node: Commands For Killing61245
|
||||
Node: Numeric Arguments63702
|
||||
Node: Commands For Completion64859
|
||||
Node: Keyboard Macros68130
|
||||
Node: Miscellaneous Commands68836
|
||||
Node: Readline vi Mode73161
|
||||
Node: GNU Free Documentation License74155
|
||||
Node: Readline Init File13751
|
||||
Node: Readline Init File Syntax14949
|
||||
Node: Conditional Init Constructs41278
|
||||
Node: Sample Init File45668
|
||||
Node: Bindable Readline Commands48794
|
||||
Node: Commands For Moving50179
|
||||
Node: Commands For History52251
|
||||
Node: Commands For Text57594
|
||||
Node: Commands For Killing61440
|
||||
Node: Numeric Arguments63897
|
||||
Node: Commands For Completion65054
|
||||
Node: Keyboard Macros68338
|
||||
Node: Miscellaneous Commands69044
|
||||
Node: Readline vi Mode73376
|
||||
Node: GNU Free Documentation License74370
|
||||
|
||||
End Tag Table
|
||||
|
||||
|
||||
Binary file not shown.
+700
-641
File diff suppressed because it is too large
Load Diff
@@ -5,7 +5,7 @@ Copyright (C) 1988-2024 Free Software Foundation, Inc.
|
||||
@set EDITION 8.3
|
||||
@set VERSION 8.3
|
||||
|
||||
@set UPDATED 15 November 2024
|
||||
@set UPDATED 29 November 2024
|
||||
@set UPDATED-MONTH November 2024
|
||||
|
||||
@set LASTCHANGE Fri Nov 15 17:56:11 EST 2024
|
||||
@set LASTCHANGE Fri Nov 29 18:18:20 EST 2024
|
||||
|
||||
@@ -625,7 +625,12 @@ rl_get_next_history (int count, int key)
|
||||
if (count == 0)
|
||||
return 0;
|
||||
|
||||
/* If the current line has changed, save the changes. */
|
||||
#if 0 /* XXX old code can leak or corrupt rl_undo_list */
|
||||
rl_maybe_replace_line ();
|
||||
#else
|
||||
_rl_maybe_replace_line (1);
|
||||
#endif
|
||||
|
||||
r = _rl_next_history_internal (count);
|
||||
|
||||
@@ -689,10 +694,19 @@ rl_get_previous_history (int count, int key)
|
||||
|
||||
/* If we don't have a line saved, then save this one. */
|
||||
had_saved_line = _rl_saved_line_for_history != 0;
|
||||
|
||||
/* XXX - if we are not editing a history line and we already had a saved
|
||||
line, we're going to lose this undo list. Not sure what the right thing
|
||||
is here - replace the saved line? */
|
||||
|
||||
rl_maybe_save_line ();
|
||||
|
||||
/* If the current line has changed, save the changes. */
|
||||
#if 0 /* XXX old code can leak or corrupt rl_undo_list */
|
||||
rl_maybe_replace_line ();
|
||||
#else
|
||||
_rl_maybe_replace_line (1);
|
||||
#endif
|
||||
|
||||
r = _rl_previous_history_internal (count);
|
||||
|
||||
|
||||
@@ -30,6 +30,10 @@ extern char *malloc ();
|
||||
extern char *realloc ();
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#if defined (HAVE_STRING_H)
|
||||
#include <string.h>
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user