bindable readline command to perform spelling correction on a word

This commit is contained in:
Chet Ramey
2021-03-18 11:48:48 -04:00
parent 83c4ad27c7
commit 6be3a741cb
16 changed files with 1607 additions and 1370 deletions
+178 -154
View File
@@ -2,9 +2,9 @@ This is bashref.info, produced by makeinfo version 6.7 from
bashref.texi.
This text is a brief description of the features that are present in the
Bash shell (version 5.1, 28 February 2021).
Bash shell (version 5.1, 4 March2021).
This is Edition 5.1, last updated 28 February 2021, of 'The GNU Bash
This is Edition 5.1, last updated 4 March2021, of 'The GNU Bash
Reference Manual', for 'Bash', Version 5.1.
Copyright (C) 1988-2021 Free Software Foundation, Inc.
@@ -27,10 +27,10 @@ Bash Features
*************
This text is a brief description of the features that are present in the
Bash shell (version 5.1, 28 February 2021). The Bash home page is
Bash shell (version 5.1, 4 March2021). The Bash home page is
<http://www.gnu.org/software/bash/>.
This is Edition 5.1, last updated 28 February 2021, of 'The GNU Bash
This is Edition 5.1, last updated 4 March2021, of 'The GNU Bash
Reference Manual', for 'Bash', Version 5.1.
Bash contains features that appear in other popular shells, and some
@@ -971,7 +971,7 @@ File: bashref.info, Node: Conditional Constructs, Next: Command Grouping, Pre
any character in the string (its usual regular expression meaning),
but in the pattern '"xxx.txt"' it can only match a literal '.'.
Shell programmers should take special care with backslashes, since
backslashes are used both by the shell and regular expressions to
backslashes are used by both the shell and regular expressions to
remove the special meaning from the following character. The
following two sets of commands are _not_ equivalent:
pattern='\.'
@@ -1059,6 +1059,7 @@ had been terminated with the '&' control operator, with a two-way pipe
established between the executing shell and the coprocess.
The syntax for a coprocess is:
coproc [NAME] COMMAND [REDIRECTIONS]
This creates a coprocess named NAME. COMMAND may be either a simple
@@ -1066,12 +1067,26 @@ command (*note Simple Commands::) or a compound command (*note Compound
Commands::). NAME is a shell variable name. If NAME is not supplied,
the default name is 'COPROC'.
If COMMAND is a compound command, NAME is optional. The word
following 'coproc' determines whether that word is interpreted as a
variable name: it is interpreted as NAME if it is not a reserved word
that introduces a compound command. If COMMAND is a simple command,
NAME is not allowed; this is to avoid confusion between NAME and the
first word of the simple command.
The recommended form to use for a coprocess is
coproc NAME { COMMAND; }
This form is recommended because simple commands result in the coprocess
always being named 'COPROC', and it is simpler to use and more complete
than the other compound commands.
There are other forms of coprocesses:
coproc NAME COMPOUND-COMMAND
coproc COMPOUND-COMMAND
coproc SIMPLE-COMMAND
If COMMAND is a compound command, NAME is optional. The word following
'coproc' determines whether that word is interpreted as a variable name:
it is interpreted as NAME if it is not a reserved word that introduces a
compound command. If COMMAND is a simple command, NAME is not allowed;
this is to avoid confusion between NAME and the first word of the simple
command.
When the coprocess is executed, the shell creates an array variable
(*note Arrays::) named NAME in the context of the executing shell. The
@@ -3386,7 +3401,8 @@ standard.
unset. Readonly variables and functions may not be unset. Some
shell variables lose their special behavior if they are unset; such
behavior is noted in the description of the individual variables.
The return status is zero unless a NAME is readonly.
The return status is zero unless a NAME is readonly or may not be
unset.

File: bashref.info, Node: Bash Builtins, Next: Modifying Shell Behavior, Prev: Bourne Shell Builtins, Up: Shell Builtin Commands
@@ -8863,6 +8879,12 @@ File: bashref.info, Node: Miscellaneous Commands, Prev: Keyboard Macros, Up:
is formatted in such a way that it can be made part of an INPUTRC
file. This command is unbound by default.
'spell-correct-word (C-x s)'
Perform spelling correction on the current word, treating it as a
directory or filename, in the same way as the 'cdspell' shell
option. Word boundaries are the same as those used by
'shell-forward-word'.
'glob-complete-word (M-g)'
The word before point is treated as a pattern for pathname
expansion, with an asterisk implicitly appended. This pattern is
@@ -11652,7 +11674,7 @@ D.4 Function Index
* accept-line (Newline or Return): Commands For History.
(line 6)
* alias-expand-line (): Miscellaneous Commands.
(line 125)
(line 131)
* backward-char (C-b): Commands For Moving. (line 15)
* backward-delete-char (Rubout): Commands For Text. (line 17)
* backward-kill-line (C-x Rubout): Commands For Killing.
@@ -11701,7 +11723,7 @@ D.4 Function Index
(line 57)
* digit-argument (M-0, M-1, ... M--): Numeric Arguments. (line 6)
* display-shell-version (C-x C-v): Miscellaneous Commands.
(line 110)
(line 116)
* do-lowercase-version (M-A, M-B, M-X, ...): Miscellaneous Commands.
(line 14)
* downcase-word (M-l): Commands For Text. (line 62)
@@ -11714,7 +11736,7 @@ D.4 Function Index
* dynamic-complete-history (M-<TAB>): Commands For Completion.
(line 90)
* edit-and-execute-command (C-x C-e): Miscellaneous Commands.
(line 134)
(line 140)
* 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.
@@ -11728,15 +11750,15 @@ D.4 Function Index
(line 33)
* forward-word (M-f): Commands For Moving. (line 18)
* glob-complete-word (M-g): Miscellaneous Commands.
(line 92)
* glob-expand-word (C-x *): Miscellaneous Commands.
(line 98)
* glob-list-expansions (C-x g): Miscellaneous Commands.
* glob-expand-word (C-x *): Miscellaneous Commands.
(line 104)
* glob-list-expansions (C-x g): Miscellaneous Commands.
(line 110)
* history-and-alias-expand-line (): Miscellaneous Commands.
(line 128)
(line 134)
* history-expand-line (M-^): Miscellaneous Commands.
(line 118)
(line 124)
* history-search-backward (): Commands For History.
(line 57)
* history-search-forward (): Commands For History.
@@ -11750,7 +11772,7 @@ D.4 Function Index
* insert-completions (M-*): Commands For Completion.
(line 22)
* insert-last-argument (M-. or M-_): Miscellaneous Commands.
(line 131)
(line 137)
* kill-line (C-k): Commands For Killing.
(line 6)
* kill-region (): Commands For Killing.
@@ -11760,7 +11782,7 @@ D.4 Function Index
* kill-word (M-d): Commands For Killing.
(line 23)
* magic-space (): Miscellaneous Commands.
(line 121)
(line 127)
* menu-complete (): Commands For Completion.
(line 26)
* menu-complete-backward (): Commands For Completion.
@@ -11808,7 +11830,7 @@ D.4 Function Index
(line 37)
* shell-backward-word (M-C-b): Commands For Moving. (line 30)
* shell-expand-line (M-C-e): Miscellaneous Commands.
(line 113)
(line 119)
* shell-forward-word (M-C-f): Commands For Moving. (line 26)
* shell-kill-word (M-C-d): Commands For Killing.
(line 32)
@@ -11816,6 +11838,8 @@ D.4 Function Index
(line 41)
* skip-csi-sequence (): Miscellaneous Commands.
(line 52)
* spell-correct-word (C-x s): Miscellaneous Commands.
(line 92)
* start-kbd-macro (C-x (): Keyboard Macros. (line 6)
* tilde-expand (M-&): Miscellaneous Commands.
(line 30)
@@ -12007,137 +12031,137 @@ D.5 Concept Index

Tag Table:
Node: Top897
Node: Introduction2817
Node: What is Bash?3033
Node: What is a shell?4147
Node: Definitions6685
Node: Basic Shell Features9636
Node: Shell Syntax10855
Node: Shell Operation11881
Node: Quoting13174
Node: Escape Character14478
Node: Single Quotes14963
Node: Double Quotes15311
Node: ANSI-C Quoting16589
Node: Locale Translation17846
Node: Comments19001
Node: Shell Commands19619
Node: Reserved Words20557
Node: Simple Commands21313
Node: Pipelines21967
Node: Lists24924
Node: Compound Commands26719
Node: Looping Constructs27731
Node: Conditional Constructs30226
Node: Command Grouping41797
Node: Coprocesses43272
Node: GNU Parallel45542
Node: Shell Functions49843
Node: Shell Parameters57063
Node: Positional Parameters61496
Node: Special Parameters62398
Node: Shell Expansions65622
Node: Brace Expansion67749
Node: Tilde Expansion70474
Node: Shell Parameter Expansion73095
Node: Command Substitution88224
Node: Arithmetic Expansion89579
Node: Process Substitution90511
Node: Word Splitting91631
Node: Filename Expansion93575
Node: Pattern Matching96124
Node: Quote Removal100114
Node: Redirections100409
Node: Executing Commands109983
Node: Simple Command Expansion110653
Node: Command Search and Execution112607
Node: Command Execution Environment114985
Node: Environment117971
Node: Exit Status119634
Node: Signals121306
Node: Shell Scripts123273
Node: Shell Builtin Commands126285
Node: Bourne Shell Builtins128323
Node: Bash Builtins149254
Node: Modifying Shell Behavior179404
Node: The Set Builtin179749
Node: The Shopt Builtin190162
Node: Special Builtins205074
Node: Shell Variables206053
Node: Bourne Shell Variables206490
Node: Bash Variables208594
Node: Bash Features241252
Node: Invoking Bash242265
Node: Bash Startup Files248278
Node: Interactive Shells253381
Node: What is an Interactive Shell?253791
Node: Is this Shell Interactive?254440
Node: Interactive Shell Behavior255255
Node: Bash Conditional Expressions258768
Node: Shell Arithmetic263345
Node: Aliases266289
Node: Arrays268902
Node: The Directory Stack274911
Node: Directory Stack Builtins275695
Node: Controlling the Prompt278663
Node: The Restricted Shell281611
Node: Bash POSIX Mode284205
Node: Shell Compatibility Mode295478
Node: Job Control302134
Node: Job Control Basics302594
Node: Job Control Builtins307596
Node: Job Control Variables312996
Node: Command Line Editing314152
Node: Introduction and Notation315823
Node: Readline Interaction317446
Node: Readline Bare Essentials318637
Node: Readline Movement Commands320420
Node: Readline Killing Commands321380
Node: Readline Arguments323298
Node: Searching324342
Node: Readline Init File326528
Node: Readline Init File Syntax327787
Node: Conditional Init Constructs348325
Node: Sample Init File352521
Node: Bindable Readline Commands355645
Node: Commands For Moving356849
Node: Commands For History358900
Node: Commands For Text363693
Node: Commands For Killing367342
Node: Numeric Arguments370375
Node: Commands For Completion371514
Node: Keyboard Macros375705
Node: Miscellaneous Commands376392
Node: Readline vi Mode382076
Node: Programmable Completion382983
Node: Programmable Completion Builtins390763
Node: A Programmable Completion Example401458
Node: Using History Interactively406705
Node: Bash History Facilities407389
Node: Bash History Builtins410394
Node: History Interaction415402
Node: Event Designators419022
Node: Word Designators420376
Node: Modifiers422136
Node: Installing Bash423947
Node: Basic Installation425084
Node: Compilers and Options428342
Node: Compiling For Multiple Architectures429083
Node: Installation Names430776
Node: Specifying the System Type431594
Node: Sharing Defaults432310
Node: Operation Controls432983
Node: Optional Features433941
Node: Reporting Bugs444741
Node: Major Differences From The Bourne Shell445935
Node: GNU Free Documentation License462785
Node: Indexes487962
Node: Builtin Index488416
Node: Reserved Word Index495243
Node: Variable Index497691
Node: Function Index513588
Node: Concept Index527098
Node: Top887
Node: Introduction2797
Node: What is Bash?3013
Node: What is a shell?4127
Node: Definitions6665
Node: Basic Shell Features9616
Node: Shell Syntax10835
Node: Shell Operation11861
Node: Quoting13154
Node: Escape Character14458
Node: Single Quotes14943
Node: Double Quotes15291
Node: ANSI-C Quoting16569
Node: Locale Translation17826
Node: Comments18981
Node: Shell Commands19599
Node: Reserved Words20537
Node: Simple Commands21293
Node: Pipelines21947
Node: Lists24904
Node: Compound Commands26699
Node: Looping Constructs27711
Node: Conditional Constructs30206
Node: Command Grouping41777
Node: Coprocesses43252
Node: GNU Parallel45915
Node: Shell Functions50216
Node: Shell Parameters57436
Node: Positional Parameters61869
Node: Special Parameters62771
Node: Shell Expansions65995
Node: Brace Expansion68122
Node: Tilde Expansion70847
Node: Shell Parameter Expansion73468
Node: Command Substitution88597
Node: Arithmetic Expansion89952
Node: Process Substitution90884
Node: Word Splitting92004
Node: Filename Expansion93948
Node: Pattern Matching96497
Node: Quote Removal100487
Node: Redirections100782
Node: Executing Commands110356
Node: Simple Command Expansion111026
Node: Command Search and Execution112980
Node: Command Execution Environment115358
Node: Environment118344
Node: Exit Status120007
Node: Signals121679
Node: Shell Scripts123646
Node: Shell Builtin Commands126658
Node: Bourne Shell Builtins128696
Node: Bash Builtins149652
Node: Modifying Shell Behavior179802
Node: The Set Builtin180147
Node: The Shopt Builtin190560
Node: Special Builtins205472
Node: Shell Variables206451
Node: Bourne Shell Variables206888
Node: Bash Variables208992
Node: Bash Features241650
Node: Invoking Bash242663
Node: Bash Startup Files248676
Node: Interactive Shells253779
Node: What is an Interactive Shell?254189
Node: Is this Shell Interactive?254838
Node: Interactive Shell Behavior255653
Node: Bash Conditional Expressions259166
Node: Shell Arithmetic263743
Node: Aliases266687
Node: Arrays269300
Node: The Directory Stack275309
Node: Directory Stack Builtins276093
Node: Controlling the Prompt279061
Node: The Restricted Shell282009
Node: Bash POSIX Mode284603
Node: Shell Compatibility Mode295876
Node: Job Control302532
Node: Job Control Basics302992
Node: Job Control Builtins307994
Node: Job Control Variables313394
Node: Command Line Editing314550
Node: Introduction and Notation316221
Node: Readline Interaction317844
Node: Readline Bare Essentials319035
Node: Readline Movement Commands320818
Node: Readline Killing Commands321778
Node: Readline Arguments323696
Node: Searching324740
Node: Readline Init File326926
Node: Readline Init File Syntax328185
Node: Conditional Init Constructs348723
Node: Sample Init File352919
Node: Bindable Readline Commands356043
Node: Commands For Moving357247
Node: Commands For History359298
Node: Commands For Text364091
Node: Commands For Killing367740
Node: Numeric Arguments370773
Node: Commands For Completion371912
Node: Keyboard Macros376103
Node: Miscellaneous Commands376790
Node: Readline vi Mode382729
Node: Programmable Completion383636
Node: Programmable Completion Builtins391416
Node: A Programmable Completion Example402111
Node: Using History Interactively407358
Node: Bash History Facilities408042
Node: Bash History Builtins411047
Node: History Interaction416055
Node: Event Designators419675
Node: Word Designators421029
Node: Modifiers422789
Node: Installing Bash424600
Node: Basic Installation425737
Node: Compilers and Options428995
Node: Compiling For Multiple Architectures429736
Node: Installation Names431429
Node: Specifying the System Type432247
Node: Sharing Defaults432963
Node: Operation Controls433636
Node: Optional Features434594
Node: Reporting Bugs445394
Node: Major Differences From The Bourne Shell446588
Node: GNU Free Documentation License463438
Node: Indexes488615
Node: Builtin Index489069
Node: Reserved Word Index495896
Node: Variable Index498344
Node: Function Index514241
Node: Concept Index527889

End Tag Table