aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJim Porter2023-07-07 18:19:08 -0700
committerJim Porter2023-07-07 22:56:44 -0700
commit118582efb3003e72e99e1e096d0323d6f9e23108 (patch)
treec71cdf285b93a8be2bb6dac88a0c83fae46b7977
parentf7a899d7ca073991d4d43acb219d4c16b158e42b (diff)
downloademacs-118582efb3003e72e99e1e096d0323d6f9e23108.tar.gz
emacs-118582efb3003e72e99e1e096d0323d6f9e23108.zip
; * doc/misc/eshell.texi: Fix typos and clean up unclear wording.
-rw-r--r--doc/misc/eshell.texi79
1 files changed, 40 insertions, 39 deletions
diff --git a/doc/misc/eshell.texi b/doc/misc/eshell.texi
index 185f7638a85..5972d2834b0 100644
--- a/doc/misc/eshell.texi
+++ b/doc/misc/eshell.texi
@@ -65,10 +65,10 @@ modify this GNU manual.''
65Eshell is a shell-like command interpreter implemented in Emacs Lisp. 65Eshell is a shell-like command interpreter implemented in Emacs Lisp.
66It invokes no external processes except for those requested by the 66It invokes no external processes except for those requested by the
67user. It is intended to be an alternative to the IELM (@pxref{Lisp 67user. It is intended to be an alternative to the IELM (@pxref{Lisp
68Interaction, Emacs Lisp Interaction, , emacs, The Emacs Editor}) 68Interaction, , , emacs, The Emacs Editor}) REPL@footnote{Short for
69REPL@footnote{Short for ``Read-Eval-Print Loop''.} for Emacs 69``Read-Eval-Print Loop''.} for Emacs @emph{and} with an interface
70@emph{and} with an interface similar to command shells such as 70similar to command shells such as @command{bash}, @command{zsh},
71@command{bash}, @command{zsh}, @command{rc}, or @command{4dos}. 71@command{rc}, or @command{4dos}.
72@c This manual is updated to release 2.4 of Eshell. 72@c This manual is updated to release 2.4 of Eshell.
73 73
74@insertcopying 74@insertcopying
@@ -217,7 +217,7 @@ that will be invoked, type this as the Eshell prompt:
217@section Invocation 217@section Invocation
218Eshell is both a command shell and an Emacs Lisp @acronym{REPL}. As a 218Eshell is both a command shell and an Emacs Lisp @acronym{REPL}. As a
219result, you can invoke commands in two different ways: in @dfn{command 219result, you can invoke commands in two different ways: in @dfn{command
220form} or in @dfn{lisp form}. 220form} or in @dfn{Lisp form}.
221 221
222You can use the semicolon (@code{;}) to separate multiple command 222You can use the semicolon (@code{;}) to separate multiple command
223invocations on a single line, executing each in turn. You can also 223invocations on a single line, executing each in turn. You can also
@@ -313,9 +313,9 @@ specify an argument of some other data type, you can use a Lisp form
313(1 2 3) 313(1 2 3)
314@end example 314@end example
315 315
316Additionally, many built-in Eshell commands (@pxref{Built-ins, Eshell 316Additionally, many built-in Eshell commands (@pxref{Built-ins}) will
317commands}) will flatten the arguments they receive, so passing a list 317flatten the arguments they receive, so passing a list as an argument
318as an argument will ``spread'' the elements into multiple arguments: 318will ``spread'' the elements into multiple arguments:
319 319
320@example 320@example
321~ $ printnl (list 1 2) 3 321~ $ printnl (list 1 2) 3
@@ -393,17 +393,20 @@ elisp, The Emacs Lisp Reference Manual}).
393 393
394@item #<process @var{name}> 394@item #<process @var{name}>
395Return the process named @var{name}. This is equivalent to 395Return the process named @var{name}. This is equivalent to
396@samp{$(get-process "@var{name}")} (@pxref{Process Information, , , 396@samp{$(get-process "@var{name}")} (@pxref{Process Information, , ,
397elisp, The Emacs Lisp Reference Manual}). 397elisp, The Emacs Lisp Reference Manual}).
398 398
399@end table 399@end table
400 400
401@node Built-ins 401@node Built-ins
402@section Built-in commands 402@section Built-in commands
403Several commands are built-in in Eshell. In order to call the 403Eshell provides a number of built-in commands, many of them
404external variant of a built-in command @code{foo}, you could call 404implementing common command-line utilities, but enhanced for Eshell.
405@code{*foo}. Usually, this should not be necessary. You can check 405(These built-in commands are just ordinary Lisp functions whose names
406what will be applied by the @code{which} command: 406begin with @code{eshell/}.) In order to call the external variant of
407a built-in command @code{foo}, you could call @code{*foo}. Usually,
408this should not be necessary. You can check what will be applied by
409the @code{which} command:
407 410
408@example 411@example
409~ $ which ls 412~ $ which ls
@@ -1027,7 +1030,9 @@ Eshell can consult them to do the right thing.
1027@item $INSIDE_EMACS 1030@item $INSIDE_EMACS
1028This variable indicates to external commands that they are being 1031This variable indicates to external commands that they are being
1029invoked from within Emacs so they can adjust their behavior if 1032invoked from within Emacs so they can adjust their behavior if
1030necessary. Its value is @code{@var{emacs-version},eshell}. 1033necessary. By default, its value is
1034@code{@var{emacs-version},eshell}. Other parts of Emacs, such as
1035Tramp, may add extra information to this value.
1031 1036
1032@end table 1037@end table
1033 1038
@@ -1132,11 +1137,11 @@ be directories @emph{and} files. Eshell provides predefined completions
1132for the built-in functions and some common external commands, and you 1137for the built-in functions and some common external commands, and you
1133can define your own for any command. 1138can define your own for any command.
1134 1139
1135Eshell completion also works for lisp forms and glob patterns. If the point is 1140Eshell completion also works for Lisp forms and glob patterns. If the
1136on a lisp form, then @key{TAB} will behave similarly to completion in 1141point is on a Lisp form, then @key{TAB} will behave similarly to
1137@code{elisp-mode} and @code{lisp-interaction-mode}. For glob patterns, the 1142completion in @code{elisp-mode} and @code{lisp-interaction-mode}. For
1138pattern will be removed from the input line, and replaced by the 1143glob patterns, the pattern will be removed from the input line, and
1139completion. 1144replaced by the completion.
1140 1145
1141If you want to see the entire list of possible completions (e.g. when it's 1146If you want to see the entire list of possible completions (e.g. when it's
1142below the @code{completion-cycle-threshold}), press @kbd{M-?}. 1147below the @code{completion-cycle-threshold}), press @kbd{M-?}.
@@ -1155,7 +1160,7 @@ for a specific major mode.
1155 1160
1156@node Control Flow 1161@node Control Flow
1157@section Control Flow 1162@section Control Flow
1158Because Eshell commands can not (easily) be combined with lisp forms, 1163Because Eshell commands can not (easily) be combined with Lisp forms,
1159Eshell provides command-oriented control flow statements for 1164Eshell provides command-oriented control flow statements for
1160convenience. 1165convenience.
1161 1166
@@ -1307,9 +1312,9 @@ index. The exact behavior depends on the type of @var{expr}'s value:
1307 1312
1308@item a sequence 1313@item a sequence
1309Expands to the element at the (zero-based) index @var{i} of the 1314Expands to the element at the (zero-based) index @var{i} of the
1310sequence (@pxref{Sequences Arrays Vectors, Sequences, , elisp, The 1315sequence (@pxref{Sequences Arrays Vectors, , , elisp, The Emacs Lisp
1311Emacs Lisp Reference Manual}). If @var{i} is negative, @var{i} counts 1316Reference Manual}). If @var{i} is negative, @var{i} counts from the
1312from the end, so -1 refers to the last element of the sequence. 1317end, so -1 refers to the last element of the sequence.
1313 1318
1314If @var{i} is a range like @code{@var{start}..@var{end}}, this expands 1319If @var{i} is a range like @code{@var{start}..@var{end}}, this expands
1315to a subsequence from the indices @var{start} to @var{end}, where 1320to a subsequence from the indices @var{start} to @var{end}, where
@@ -1397,8 +1402,8 @@ By default, globs are case sensitive, except on MS-DOS/MS-Windows
1397systems. You can control this behavior via the 1402systems. You can control this behavior via the
1398@code{eshell-glob-case-insensitive} option. You can further customize 1403@code{eshell-glob-case-insensitive} option. You can further customize
1399the syntax and behavior of globbing in Eshell via the Customize group 1404the syntax and behavior of globbing in Eshell via the Customize group
1400``eshell-glob'' (@pxref{Easy Customization, , , emacs, The GNU Emacs 1405@code{eshell-glob} (@pxref{Easy Customization, , , emacs, The GNU
1401Manual}). 1406Emacs Manual}).
1402 1407
1403@table @samp 1408@table @samp
1404 1409
@@ -1496,7 +1501,7 @@ the following pairs of delimiters: @code{"@dots{}"}, @code{'@dots{}'},
1496@code{[@dots{}]}, @code{<@dots{}>}, or @code{@{@dots{}@}}. 1501@code{[@dots{}]}, @code{<@dots{}>}, or @code{@{@dots{}@}}.
1497 1502
1498You can customize the syntax and behavior of predicates and modifiers 1503You can customize the syntax and behavior of predicates and modifiers
1499in Eshell via the Customize group ``eshell-pred'' (@pxref{Easy 1504in Eshell via the Customize group @code{eshell-pred} (@pxref{Easy
1500Customization, , , emacs, The GNU Emacs Manual}). 1505Customization, , , emacs, The GNU Emacs Manual}).
1501 1506
1502@menu 1507@menu
@@ -1792,26 +1797,26 @@ output.
1792Redirect output to @var{dest}, appending it to the existing contents 1797Redirect output to @var{dest}, appending it to the existing contents
1793of @var{dest}. 1798of @var{dest}.
1794 1799
1795@item >>> @var{buffer} 1800@item >>> @var{dest}
1796@itemx @var{fd}>>> @var{buffer} 1801@itemx @var{fd}>>> @var{dest}
1797Redirect output to @var{dest}, inserting it at the current mark if 1802Redirect output to @var{dest}, inserting it at the current mark if
1798@var{dest} is a buffer, at the beginning of the file if @var{dest} is 1803@var{dest} is a buffer, at the beginning of the file if @var{dest} is
1799a file, or otherwise behaving the same as @code{>>}. 1804a file, or otherwise behaving the same as @code{>>}.
1800 1805
1801@item &> @var{file} 1806@item &> @var{dest}
1802@itemx >& @var{file} 1807@itemx >& @var{dest}
1803Redirect both standard output and standard error to @var{dest}, 1808Redirect both standard output and standard error to @var{dest},
1804overwriting its contents with the new output. 1809overwriting its contents with the new output.
1805 1810
1806@item &>> @var{file} 1811@item &>> @var{dest}
1807@itemx >>& @var{file} 1812@itemx >>& @var{dest}
1808Redirect both standard output and standard error to @var{dest}, 1813Redirect both standard output and standard error to @var{dest},
1809appending it to the existing contents of @var{dest}. 1814appending it to the existing contents of @var{dest}.
1810 1815
1811@item &>>> @var{file} 1816@item &>>> @var{dest}
1812@itemx >>>& @var{file} 1817@itemx >>>& @var{dest}
1813Redirect both standard output and standard error to @var{dest}, 1818Redirect both standard output and standard error to @var{dest},
1814inserting it like with @code{>>> @var{file}}. 1819inserting it like with @code{>>> @var{dest}}.
1815 1820
1816@item >&@var{other-fd} 1821@item >&@var{other-fd}
1817@itemx @var{fd}>&@var{other-fd} 1822@itemx @var{fd}>&@var{other-fd}
@@ -2430,10 +2435,6 @@ A special associate array, which can take references of the form
2430 2435
2431@item Support zsh's ``Parameter Expansion'' syntax, i.e., @samp{$@{@var{name}:-@var{val}@}} 2436@item Support zsh's ``Parameter Expansion'' syntax, i.e., @samp{$@{@var{name}:-@var{val}@}}
2432 2437
2433@item Write an @command{info} alias that can take arguments
2434
2435So that the user can enter @samp{info chmod}, for example.
2436
2437@item Create a mode @code{eshell-browse} 2438@item Create a mode @code{eshell-browse}
2438 2439
2439It would treat the Eshell buffer as an outline. Collapsing the outline 2440It would treat the Eshell buffer as an outline. Collapsing the outline