diff options
| author | Michael Albinus | 2009-12-09 10:10:18 +0000 |
|---|---|---|
| committer | Michael Albinus | 2009-12-09 10:10:18 +0000 |
| commit | 020335dfbf84fadd414cf8310853605baf1df1d1 (patch) | |
| tree | bffaa4d87aaa6a16d9f797001af958624899b243 /doc | |
| parent | 99999a1d72bd57f7e902a66564599beb57b56011 (diff) | |
| download | emacs-020335dfbf84fadd414cf8310853605baf1df1d1.tar.gz emacs-020335dfbf84fadd414cf8310853605baf1df1d1.zip | |
* eshell.texi (History): Add the other built-in variables.
(Built-ins): Explain built-ins, and how to apply the external commands.
Add `history', `su' and `sudo'.
* tramp.texi (Remote processes): Add missing <RET> in the example.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/misc/ChangeLog | 8 | ||||
| -rw-r--r-- | doc/misc/eshell.texi | 70 | ||||
| -rw-r--r-- | doc/misc/tramp.texi | 5 |
3 files changed, 80 insertions, 3 deletions
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index eb8877e9f51..05ee0cfb357 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog | |||
| @@ -1,3 +1,11 @@ | |||
| 1 | 2009-12-09 Michael Albinus <michael.albinus@gmx.de> | ||
| 2 | |||
| 3 | * eshell.texi (History): Add the other built-in variables. | ||
| 4 | (Built-ins): Explain built-ins, and how to apply the external commands. | ||
| 5 | Add `history', `su' and `sudo'. | ||
| 6 | |||
| 7 | * tramp.texi (Remote processes): Add missing <RET> in the example. | ||
| 8 | |||
| 1 | 2009-12-01 Bill Wohler <wohler@newt.com> | 9 | 2009-12-01 Bill Wohler <wohler@newt.com> |
| 2 | 10 | ||
| 3 | * mh-e.texi (Searching): Use mh vfolder_format and fix typo in database | 11 | * mh-e.texi (Searching): Use mh vfolder_format and fix typo in database |
diff --git a/doc/misc/eshell.texi b/doc/misc/eshell.texi index e7d4132c4b8..f0b2374b59a 100644 --- a/doc/misc/eshell.texi +++ b/doc/misc/eshell.texi | |||
| @@ -334,6 +334,20 @@ This variable always contains the current working directory. | |||
| 334 | This variable always contains the previous working directory (the | 334 | This variable always contains the previous working directory (the |
| 335 | current working directory from before the last @code{cd} command). | 335 | current working directory from before the last @code{cd} command). |
| 336 | 336 | ||
| 337 | @item $_ | ||
| 338 | @vindex $_ | ||
| 339 | It refers to the last argument of the last command. | ||
| 340 | |||
| 341 | @item $$ | ||
| 342 | @vindex $$ | ||
| 343 | This is the result of the last command. In case of an external | ||
| 344 | command, it is @code{t} or @code{nil}. | ||
| 345 | |||
| 346 | @item $? | ||
| 347 | @vindex $? | ||
| 348 | This variable contains the exit code of the last command (0 or 1 for | ||
| 349 | Lisp functions, based on successful completion). | ||
| 350 | |||
| 337 | @end table | 351 | @end table |
| 338 | 352 | ||
| 339 | @node Scripts | 353 | @node Scripts |
| @@ -343,7 +357,19 @@ current working directory from before the last @code{cd} command). | |||
| 343 | @node Built-ins | 357 | @node Built-ins |
| 344 | @section Built-in commands | 358 | @section Built-in commands |
| 345 | 359 | ||
| 346 | Here is a list of built-in commands that Eshell knows about: | 360 | Several commands are built-in in Eshell. In order to call the |
| 361 | external variant of a built-in command @code{foo}, you could call | ||
| 362 | @code{*foo}. Usually, this should not be necessary. You can check | ||
| 363 | what will be applied by the @code{which} command: | ||
| 364 | |||
| 365 | @example | ||
| 366 | ~ $ which ls | ||
| 367 | eshell/ls is a compiled Lisp function in `em-ls.el' | ||
| 368 | ~ $ which *ls | ||
| 369 | /bin/ls | ||
| 370 | @end example | ||
| 371 | |||
| 372 | Some of the built-in commands have a special behaviour in Eshell: | ||
| 347 | 373 | ||
| 348 | @table @code | 374 | @table @code |
| 349 | 375 | ||
| @@ -367,6 +393,48 @@ that directory. | |||
| 367 | 393 | ||
| 368 | With @samp{cd -42}, you can access the directory stack by number. | 394 | With @samp{cd -42}, you can access the directory stack by number. |
| 369 | 395 | ||
| 396 | @item history | ||
| 397 | @findex history | ||
| 398 | The @samp{history} command shows all commands kept in the history ring | ||
| 399 | as numbered list. If the history ring contains | ||
| 400 | @code{eshell-history-size} commands, those numbers change after every | ||
| 401 | command invocation, therefore the @samp{history} command shall be | ||
| 402 | applied before using the expansion mechanism with history numbers. | ||
| 403 | |||
| 404 | The n-th entry of the history ring can be applied with the @samp{!n} | ||
| 405 | command. If @code{n} is negative, the entry is counted from the end | ||
| 406 | of the history ring. | ||
| 407 | |||
| 408 | @samp{!foo} expands to the last command beginning with @code{foo}, and | ||
| 409 | @samp{!?foo} to the last command containing @code{foo}. The n-th | ||
| 410 | argument of the last command beginning with @code{foo} is accessible | ||
| 411 | by @code{!foo:n}. | ||
| 412 | |||
| 413 | @item su | ||
| 414 | @findex su | ||
| 415 | @itemx sudo | ||
| 416 | @findex sudo | ||
| 417 | @code{su} and @code{sudo} work as expected: they apply the following | ||
| 418 | commands (@code{su}), or the command being an argument (@code{sudo}) | ||
| 419 | under the permissions of somebody else. | ||
| 420 | |||
| 421 | This does not work only on | ||
| 422 | the local host, but even on a remote one, when | ||
| 423 | @code{default-directory} is a remote file name. The necessary | ||
| 424 | proxy configuration of Tramp is performed | ||
| 425 | @ifinfo | ||
| 426 | automatically, @ref{Multi-hops, , , tramp}. | ||
| 427 | @end ifinfo | ||
| 428 | @ifnotinfo | ||
| 429 | automatically. | ||
| 430 | @end ifnotinfo | ||
| 431 | Example: | ||
| 432 | |||
| 433 | @example | ||
| 434 | ~ $ cd /ssh:otherhost:/etc | ||
| 435 | /ssh:user@@otherhost:/etc $ sudo find-file shadow | ||
| 436 | @end example | ||
| 437 | |||
| 370 | @end table | 438 | @end table |
| 371 | 439 | ||
| 372 | 440 | ||
diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi index f0c0b6a3924..d68be209a99 100644 --- a/doc/misc/tramp.texi +++ b/doc/misc/tramp.texi | |||
| @@ -2594,10 +2594,11 @@ variable @code{tramp-default-proxies-alist} (@pxref{Multi-hops}): | |||
| 2594 | 2594 | ||
| 2595 | @example | 2595 | @example |
| 2596 | @b{~ $} cd @trampfn{ssh, user, remotehost, /etc} @key{RET} | 2596 | @b{~ $} cd @trampfn{ssh, user, remotehost, /etc} @key{RET} |
| 2597 | @b{@trampfn{ssh, user, remotehost, /etc} $} find-file shadow | 2597 | @b{@trampfn{ssh, user, remotehost, /etc} $} find-file shadow @key{RET} |
| 2598 | File is not readable: @trampfn{ssh, user, remotehost, /etc/shadow} | 2598 | File is not readable: @trampfn{ssh, user, remotehost, /etc/shadow} |
| 2599 | @b{@trampfn{ssh, user, remotehost, /etc} $} sudo find-file shadow | 2599 | @b{@trampfn{ssh, user, remotehost, /etc} $} sudo find-file shadow @key{RET} |
| 2600 | #<buffer shadow> | 2600 | #<buffer shadow> |
| 2601 | |||
| 2601 | @b{@trampfn{ssh, user, remotehost, /etc} $} su - @key{RET} | 2602 | @b{@trampfn{ssh, user, remotehost, /etc} $} su - @key{RET} |
| 2602 | @b{@trampfn{su, root, remotehost, /root} $} id @key{RET} | 2603 | @b{@trampfn{su, root, remotehost, /root} $} id @key{RET} |
| 2603 | uid=0(root) gid=0(root) groups=0(root) | 2604 | uid=0(root) gid=0(root) groups=0(root) |