diff options
| author | Jim Porter | 2023-07-07 18:19:08 -0700 |
|---|---|---|
| committer | Jim Porter | 2023-07-07 22:56:44 -0700 |
| commit | 118582efb3003e72e99e1e096d0323d6f9e23108 (patch) | |
| tree | c71cdf285b93a8be2bb6dac88a0c83fae46b7977 | |
| parent | f7a899d7ca073991d4d43acb219d4c16b158e42b (diff) | |
| download | emacs-118582efb3003e72e99e1e096d0323d6f9e23108.tar.gz emacs-118582efb3003e72e99e1e096d0323d6f9e23108.zip | |
; * doc/misc/eshell.texi: Fix typos and clean up unclear wording.
| -rw-r--r-- | doc/misc/eshell.texi | 79 |
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.'' | |||
| 65 | Eshell is a shell-like command interpreter implemented in Emacs Lisp. | 65 | Eshell is a shell-like command interpreter implemented in Emacs Lisp. |
| 66 | It invokes no external processes except for those requested by the | 66 | It invokes no external processes except for those requested by the |
| 67 | user. It is intended to be an alternative to the IELM (@pxref{Lisp | 67 | user. It is intended to be an alternative to the IELM (@pxref{Lisp |
| 68 | Interaction, Emacs Lisp Interaction, , emacs, The Emacs Editor}) | 68 | Interaction, , , emacs, The Emacs Editor}) REPL@footnote{Short for |
| 69 | REPL@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 | 70 | similar 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 |
| 218 | Eshell is both a command shell and an Emacs Lisp @acronym{REPL}. As a | 218 | Eshell is both a command shell and an Emacs Lisp @acronym{REPL}. As a |
| 219 | result, you can invoke commands in two different ways: in @dfn{command | 219 | result, you can invoke commands in two different ways: in @dfn{command |
| 220 | form} or in @dfn{lisp form}. | 220 | form} or in @dfn{Lisp form}. |
| 221 | 221 | ||
| 222 | You can use the semicolon (@code{;}) to separate multiple command | 222 | You can use the semicolon (@code{;}) to separate multiple command |
| 223 | invocations on a single line, executing each in turn. You can also | 223 | invocations 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 | ||
| 316 | Additionally, many built-in Eshell commands (@pxref{Built-ins, Eshell | 316 | Additionally, many built-in Eshell commands (@pxref{Built-ins}) will |
| 317 | commands}) will flatten the arguments they receive, so passing a list | 317 | flatten the arguments they receive, so passing a list as an argument |
| 318 | as an argument will ``spread'' the elements into multiple arguments: | 318 | will ``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}> |
| 395 | Return the process named @var{name}. This is equivalent to | 395 | Return 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, , , |
| 397 | elisp, The Emacs Lisp Reference Manual}). | 397 | elisp, 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 |
| 403 | Several commands are built-in in Eshell. In order to call the | 403 | Eshell provides a number of built-in commands, many of them |
| 404 | external variant of a built-in command @code{foo}, you could call | 404 | implementing 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 |
| 406 | what will be applied by the @code{which} command: | 406 | begin with @code{eshell/}.) In order to call the external variant of |
| 407 | a built-in command @code{foo}, you could call @code{*foo}. Usually, | ||
| 408 | this should not be necessary. You can check what will be applied by | ||
| 409 | the @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 |
| 1028 | This variable indicates to external commands that they are being | 1031 | This variable indicates to external commands that they are being |
| 1029 | invoked from within Emacs so they can adjust their behavior if | 1032 | invoked from within Emacs so they can adjust their behavior if |
| 1030 | necessary. Its value is @code{@var{emacs-version},eshell}. | 1033 | necessary. By default, its value is |
| 1034 | @code{@var{emacs-version},eshell}. Other parts of Emacs, such as | ||
| 1035 | Tramp, 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 | |||
| 1132 | for the built-in functions and some common external commands, and you | 1137 | for the built-in functions and some common external commands, and you |
| 1133 | can define your own for any command. | 1138 | can define your own for any command. |
| 1134 | 1139 | ||
| 1135 | Eshell completion also works for lisp forms and glob patterns. If the point is | 1140 | Eshell completion also works for Lisp forms and glob patterns. If the |
| 1136 | on a lisp form, then @key{TAB} will behave similarly to completion in | 1141 | point 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 | 1142 | completion in @code{elisp-mode} and @code{lisp-interaction-mode}. For |
| 1138 | pattern will be removed from the input line, and replaced by the | 1143 | glob patterns, the pattern will be removed from the input line, and |
| 1139 | completion. | 1144 | replaced by the completion. |
| 1140 | 1145 | ||
| 1141 | If you want to see the entire list of possible completions (e.g. when it's | 1146 | If you want to see the entire list of possible completions (e.g. when it's |
| 1142 | below the @code{completion-cycle-threshold}), press @kbd{M-?}. | 1147 | below 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 |
| 1158 | Because Eshell commands can not (easily) be combined with lisp forms, | 1163 | Because Eshell commands can not (easily) be combined with Lisp forms, |
| 1159 | Eshell provides command-oriented control flow statements for | 1164 | Eshell provides command-oriented control flow statements for |
| 1160 | convenience. | 1165 | convenience. |
| 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 |
| 1309 | Expands to the element at the (zero-based) index @var{i} of the | 1314 | Expands to the element at the (zero-based) index @var{i} of the |
| 1310 | sequence (@pxref{Sequences Arrays Vectors, Sequences, , elisp, The | 1315 | sequence (@pxref{Sequences Arrays Vectors, , , elisp, The Emacs Lisp |
| 1311 | Emacs Lisp Reference Manual}). If @var{i} is negative, @var{i} counts | 1316 | Reference Manual}). If @var{i} is negative, @var{i} counts from the |
| 1312 | from the end, so -1 refers to the last element of the sequence. | 1317 | end, so -1 refers to the last element of the sequence. |
| 1313 | 1318 | ||
| 1314 | If @var{i} is a range like @code{@var{start}..@var{end}}, this expands | 1319 | If @var{i} is a range like @code{@var{start}..@var{end}}, this expands |
| 1315 | to a subsequence from the indices @var{start} to @var{end}, where | 1320 | to 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 | |||
| 1397 | systems. You can control this behavior via the | 1402 | systems. 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 |
| 1399 | the syntax and behavior of globbing in Eshell via the Customize group | 1404 | the 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 |
| 1401 | Manual}). | 1406 | Emacs 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 | ||
| 1498 | You can customize the syntax and behavior of predicates and modifiers | 1503 | You can customize the syntax and behavior of predicates and modifiers |
| 1499 | in Eshell via the Customize group ``eshell-pred'' (@pxref{Easy | 1504 | in Eshell via the Customize group @code{eshell-pred} (@pxref{Easy |
| 1500 | Customization, , , emacs, The GNU Emacs Manual}). | 1505 | Customization, , , emacs, The GNU Emacs Manual}). |
| 1501 | 1506 | ||
| 1502 | @menu | 1507 | @menu |
| @@ -1792,26 +1797,26 @@ output. | |||
| 1792 | Redirect output to @var{dest}, appending it to the existing contents | 1797 | Redirect output to @var{dest}, appending it to the existing contents |
| 1793 | of @var{dest}. | 1798 | of @var{dest}. |
| 1794 | 1799 | ||
| 1795 | @item >>> @var{buffer} | 1800 | @item >>> @var{dest} |
| 1796 | @itemx @var{fd}>>> @var{buffer} | 1801 | @itemx @var{fd}>>> @var{dest} |
| 1797 | Redirect output to @var{dest}, inserting it at the current mark if | 1802 | Redirect 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 |
| 1799 | a file, or otherwise behaving the same as @code{>>}. | 1804 | a 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} |
| 1803 | Redirect both standard output and standard error to @var{dest}, | 1808 | Redirect both standard output and standard error to @var{dest}, |
| 1804 | overwriting its contents with the new output. | 1809 | overwriting its contents with the new output. |
| 1805 | 1810 | ||
| 1806 | @item &>> @var{file} | 1811 | @item &>> @var{dest} |
| 1807 | @itemx >>& @var{file} | 1812 | @itemx >>& @var{dest} |
| 1808 | Redirect both standard output and standard error to @var{dest}, | 1813 | Redirect both standard output and standard error to @var{dest}, |
| 1809 | appending it to the existing contents of @var{dest}. | 1814 | appending 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} |
| 1813 | Redirect both standard output and standard error to @var{dest}, | 1818 | Redirect both standard output and standard error to @var{dest}, |
| 1814 | inserting it like with @code{>>> @var{file}}. | 1819 | inserting 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 | |||
| 2435 | So 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 | ||
| 2439 | It would treat the Eshell buffer as an outline. Collapsing the outline | 2440 | It would treat the Eshell buffer as an outline. Collapsing the outline |