Mercurial > emacs
comparison man/eshell.texi @ 35588:31904bdf4350
See ChangeLog
author | John Wiegley <johnw@newartisans.com> |
---|---|
date | Fri, 26 Jan 2001 06:19:25 +0000 |
parents | dd613770eb0f |
children | 84253e69015f |
comparison
equal
deleted
inserted
replaced
35587:7e767148cfdc | 35588:31904bdf4350 |
---|---|
1 \input texinfo @c -*-texinfo-*- | 1 \input texinfo @c -*-texinfo-*- |
2 | 2 |
3 @c "@(#)$Name: $:$Id: eshell.texi,v 1.6 2000/10/29 16:52:33 eliz Exp $" | 3 @c "@(#)$Name: $:$Id: eshell.texi,v 1.7 2000/12/06 20:02:30 fx Exp $" |
4 | 4 |
5 @c Documentation for Eshell: The Emacs Shell. | 5 @c Documentation for Eshell: The Emacs Shell. |
6 @c Copyright (C) 1999, 2000 Free Software Foundation, Inc. | 6 @c Copyright (C) 1999, 2000 Free Software Foundation, Inc. |
7 | 7 |
8 @c This file is part of GNU Emacs | 8 @c This file is part of GNU Emacs |
121 handling the sort of tasks accomplished by those tools. | 121 handling the sort of tasks accomplished by those tools. |
122 @c This manual is updated to release 2.4 of Eshell. | 122 @c This manual is updated to release 2.4 of Eshell. |
123 @end ifinfo | 123 @end ifinfo |
124 | 124 |
125 @menu | 125 @menu |
126 * What is Eshell?:: A brief introduction to the Emacs Shell. | 126 * What is Eshell?:: A brief introduction to the Emacs Shell. |
127 * Installation:: For users of Emacs 20 and XEmacs. | 127 * Installation:: For users of Emacs 20 and XEmacs. |
128 * Command basics:: The basics of command usage. | 128 * Command basics:: The basics of command usage. |
129 * Bugs and ideas:: Known problems, and future ideas. | 129 * Commands:: |
130 * Concept Index:: | 130 * Arguments:: |
131 * Function and Variable Index:: | 131 * Input/Output:: |
132 * Key Index:: | 132 * Process control:: |
133 * Extension modules:: | |
134 * Extras and Goodies:: | |
135 * Bugs and ideas:: Known problems, and future ideas. | |
136 * Concept Index:: | |
137 * Function and Variable Index:: | |
138 * Key Index:: | |
133 @end menu | 139 @end menu |
134 | 140 |
135 @node What is Eshell?, Installation, Top, Top | 141 @node What is Eshell?, Installation, Top, Top |
136 @chapter What is Eshell? | 142 @chapter What is Eshell? |
137 @cindex what is Eshell? | 143 @cindex what is Eshell? |
138 @cindex Eshell, what it is | 144 @cindex Eshell, what it is |
139 | 145 |
140 Eshell is a @dfn{command shell} written in Emacs Lisp. Everything it | 146 Eshell is a @dfn{command shell} written in Emacs Lisp. Everything it |
141 does it uses Emacs' facilities to do. This means that Eshell is as | 147 does, it uses Emacs' facilities to do. This means that Eshell is as |
142 portable as Emacs itself. It also means that cooperation with Lisp code | 148 portable as Emacs itself. It also means that cooperation with Lisp code |
143 is natural and seamless. | 149 is natural and seamless. |
144 | 150 |
145 What is a command shell? To properly understand the role of a shell, | 151 What is a command shell? To properly understand the role of a shell, |
146 it's necessary to visualize what a computer does for you. Basically, a | 152 it's necessary to visualize what a computer does for you. Basically, a |
354 If any of the tests fail, please send e-mail to the Eshell maintainer | 360 If any of the tests fail, please send e-mail to the Eshell maintainer |
355 using the command @kbd{M-x eshell-report-bug}. | 361 using the command @kbd{M-x eshell-report-bug}. |
356 | 362 |
357 @item | 363 @item |
358 Edit the file @file{Makefile} in the directory containing the Eshell | 364 Edit the file @file{Makefile} in the directory containing the Eshell |
359 sources to reflect the location of certain Emacs dircetories at your | 365 sources to reflect the location of certain Emacs directories at your |
360 site. The only things you really have to change are the definitions of | 366 site. The only things you really have to change are the definitions of |
361 @code{lispdir} and @code{infodir}. The elisp files will be copied to | 367 @code{lispdir} and @code{infodir}. The elisp files will be copied to |
362 @code{lispdir}, and the info file to @code{infodir}. | 368 @code{lispdir}, and the info file to @code{infodir}. |
363 | 369 |
364 @item | 370 @item |
419 is also a program which comes together with @TeX{}, @code{dvips}, which | 425 is also a program which comes together with @TeX{}, @code{dvips}, which |
420 you can use. For other printers, use a suitable DVI driver, | 426 you can use. For other printers, use a suitable DVI driver, |
421 e.g., @code{dvilj4} for LaserJet-compatible printers. | 427 e.g., @code{dvilj4} for LaserJet-compatible printers. |
422 @end enumerate | 428 @end enumerate |
423 | 429 |
424 @node Command basics, Bugs and ideas, Installation, Top | 430 @node Command basics, Commands, Installation, Top |
425 @chapter Command basics | 431 @chapter Basic overview |
426 | 432 |
427 A command shell is a mechanism for entering verbally-formed commands. | 433 A command shell is a means of entering verbally-formed commands. This |
428 This is really all that it does, and every feature described in this | 434 is really all that it does, and every feature described in this manual |
429 manual is a means to that end. Therefore, it's important to get a firm | 435 is a means to that end. Therefore, it's important to take firm hold on |
430 grasp on exactly what a command is, and how it fits into the overall | 436 exactly what a command is, and how it fits in the overall picture of |
431 picture of things. | 437 things. |
432 | 438 |
433 @menu | 439 @menu |
434 * Commands verbs:: Commands always begin with a verb. | 440 * Commands verbs:: Commands always begin with a verb. |
435 * Command arguments:: Some verbs require arguments. | 441 * Command arguments:: Some verbs require arguments. |
436 @end menu | 442 @end menu |
437 | 443 |
438 @node Commands verbs, Command arguments, Command basics, Command basics | 444 @node Commands verbs, Command arguments, Command basics, Command basics |
439 @section Commands verbs | 445 @section Commands verbs |
440 | 446 |
441 Commands are expressed using @dfn{script}, a special shorthand language | 447 Commands are expressed using @dfn{script}, a special shorthand language |
442 that computers can understand without trouble. | 448 computers can understand with no trouble. Script is an extremely simple |
443 | 449 language; oddly enough, this is what makes it look so complicated! |
444 Script is an extremely simplified language. Oddly enough, this actually | 450 Whereas normal languages use a variety of embellishments, the form of a |
445 makes it look more complicated than it is. Whereas normal languages use | 451 script command is always: |
446 a variety of embellishments, the form of a script command is always: | |
447 | 452 |
448 @example | 453 @example |
449 VERB [ARGUMENTS] | 454 VERB [ARGUMENTS] |
450 @end example | 455 @end example |
451 | 456 |
453 number of verbs, although this number is usually quite large. On the | 458 number of verbs, although this number is usually quite large. On the |
454 author's computer, it reaches almost 1400 in number. But of course, | 459 author's computer, it reaches almost 1400 in number. But of course, |
455 only a handful of these are really necessary. | 460 only a handful of these are really necessary. |
456 | 461 |
457 Sometimes, the verb is all that's written. A verb is always a single | 462 Sometimes, the verb is all that's written. A verb is always a single |
458 word, usually related to the task it will perform. @command{reboot} is | 463 word, usually related to the task it performs. @command{reboot} is a |
459 a good example. Entering that will cause your computer to reboot, | 464 good example. Entering that on Linux will cause your computer to |
460 assuming you have sufficient privileges. | 465 reboot---assuming you have sufficient privileges. |
461 | 466 |
462 Other verbs require more information. These are usually very capable of | 467 Other verbs require more information. These are usually very capable |
463 verbs, and must be told more specifically what to do. This extra | 468 verbs, and must be told specifically what to do. The extra information |
464 information is given in the form of arguments. Arguments are also | 469 is given in the form of @dfn{arguments}. For example, the |
465 single words, that appear after the verb. For example, @command{echo} | 470 @command{echo} verb prints back whatever arguments you type. It |
466 is a command verb that prints back whatever you say. @command{echo} | 471 requires these arguments to know what to echo. A proper use of |
467 requires arguments, so that it knows what to echo. A proper use of | |
468 @command{echo} looks like this: | 472 @command{echo} looks like this: |
469 | 473 |
470 @example | 474 @example |
471 echo This is an example of using echo! | 475 echo This is an example of using echo! |
472 @end example | 476 @end example |
473 | 477 |
474 This piece of script expresses a command that causes the computer to | 478 This script command causes the computer to echo back: ``This is an |
475 print back: ``This is an example of using echo!''. | 479 example of using echo!''. |
476 | 480 |
477 Although command verbs always take the form of simple words, such as | 481 Although command verbs are always simple words, like @command{reboot} or |
478 @command{reboot} and @command{echo}, arguments have a wide vaierty of | 482 @command{echo}, arguments may have a wide variety of forms. There are |
479 forms. There are textual arguments, numerical arguments---even Lisp | 483 textual arguments, numerical arguments---even Lisp arguments. |
480 arguments. Distinguishing between these different types of arguments | 484 Distinguishing these different types of arguments requires special |
481 requires special typing, since the computer needs to know exactly what | 485 typing, for the computer to know exactly what you mean. |
482 you mean. | |
483 | 486 |
484 @node Command arguments, , Commands verbs, Command basics | 487 @node Command arguments, , Commands verbs, Command basics |
485 @section Command arguments | 488 @section Command arguments |
486 | 489 |
487 @node Bugs and ideas, Concept Index, Command basics, Top | 490 Eshell recognizes several different kinds of command arguments: |
491 | |
492 @enumerate | |
493 @item Strings (also called textual arguments) | |
494 @item Numbers (floating point or integer) | |
495 @item Lisp lists | |
496 @item Lisp symbols | |
497 @item Emacs buffers | |
498 @item Emacs process handles | |
499 @end enumerate | |
500 | |
501 Most users need worry only about the first two. The third, Lisp lists, | |
502 occur very frequently, but almost always behind the scenes. | |
503 | |
504 Strings are the most common type of argument, and consist of nearly any | |
505 character. Special characters---those used by Eshell | |
506 specifically---must be preceded by a backslash (\). When in doubt, it | |
507 safe to add backslashes anywhere and everywhere. | |
508 | |
509 Here is a more complicated @command{echo} example: | |
510 | |
511 @example | |
512 echo A\ Multi-word\ Argument\ With\ A\ \$\ dollar | |
513 @end example | |
514 | |
515 Beyond this, things get a bit more complicated. While not beyond the | |
516 reach of someone wishing to learn, it is definitely beyond the scope of | |
517 this manual to present it all in a simplistic manner. Get comfortable | |
518 with Eshell as a basic command invocation tool, and learn more about the | |
519 commands on your system; then come back when it all sits more familiarly | |
520 on your mind. Have fun! | |
521 | |
522 @node Commands, Arguments, Command basics, Top | |
523 @chapter Commands | |
524 | |
525 @menu | |
526 * Invocation:: | |
527 * Completion:: | |
528 * Aliases:: | |
529 * History:: | |
530 * Scripts:: | |
531 @end menu | |
532 | |
533 @node Invocation, Completion, Commands, Commands | |
534 @section Invocation | |
535 | |
536 @node Completion, Aliases, Invocation, Commands | |
537 @section Completion | |
538 | |
539 @node Aliases, History, Completion, Commands | |
540 @section Aliases | |
541 | |
542 @node History, Scripts, Aliases, Commands | |
543 @section History | |
544 | |
545 @node Scripts, , History, Commands | |
546 @section Scripts | |
547 | |
548 | |
549 @node Arguments, Input/Output, Commands, Top | |
550 @chapter Arguments | |
551 | |
552 @menu | |
553 * The Parser:: | |
554 * Variables:: | |
555 * Substitution:: | |
556 * Globbing:: | |
557 * Predicates:: | |
558 @end menu | |
559 | |
560 @node The Parser, Variables, Arguments, Arguments | |
561 @section The Parser | |
562 | |
563 @node Variables, Substitution, The Parser, Arguments | |
564 @section Variables | |
565 | |
566 @node Substitution, Globbing, Variables, Arguments | |
567 @section Substitution | |
568 | |
569 @node Globbing, Predicates, Substitution, Arguments | |
570 @section Globbing | |
571 | |
572 @node Predicates, , Globbing, Arguments | |
573 @section Predicates | |
574 | |
575 | |
576 @node Input/Output, Process control, Arguments, Top | |
577 @chapter Input/Output | |
578 | |
579 @node Process control, Extension modules, Input/Output, Top | |
580 @chapter Process control | |
581 | |
582 | |
583 @node Extension modules, Extras and Goodies, Process control, Top | |
584 @chapter Extension modules | |
585 | |
586 @menu | |
587 * Writing a module:: | |
588 * Module testing:: | |
589 * Directory handling:: | |
590 * Key rebinding:: | |
591 * Smart scrolling:: | |
592 * Terminal emulation:: | |
593 * Built-in UNIX commands:: | |
594 @end menu | |
595 | |
596 @node Writing a module, Module testing, Extension modules, Extension modules | |
597 @section Writing a module | |
598 | |
599 @node Module testing, Directory handling, Writing a module, Extension modules | |
600 @section Module testing | |
601 | |
602 @node Directory handling, Key rebinding, Module testing, Extension modules | |
603 @section Directory handling | |
604 | |
605 @node Key rebinding, Smart scrolling, Directory handling, Extension modules | |
606 @section Key rebinding | |
607 | |
608 @node Smart scrolling, Terminal emulation, Key rebinding, Extension modules | |
609 @section Smart scrolling | |
610 | |
611 @node Terminal emulation, Built-in UNIX commands, Smart scrolling, Extension modules | |
612 @section Terminal emulation | |
613 | |
614 @node Built-in UNIX commands, , Terminal emulation, Extension modules | |
615 @section Built-in UNIX commands | |
616 | |
617 | |
618 @node Extras and Goodies, Bugs and ideas, Extension modules, Top | |
619 @chapter Extras and Goodies | |
620 | |
621 @node Bugs and ideas, Concept Index, Extras and Goodies, Top | |
488 @chapter Bugs and ideas | 622 @chapter Bugs and ideas |
489 @cindex reporting bugs and ideas | 623 @cindex reporting bugs and ideas |
490 @cindex bugs, how to report them | 624 @cindex bugs, how to report them |
491 @cindex author, how to reach | 625 @cindex author, how to reach |
492 @cindex email to the author | 626 @cindex email to the author |
509 @node Known problems, , Bugs and ideas, Bugs and ideas | 643 @node Known problems, , Bugs and ideas, Bugs and ideas |
510 @section Known problems | 644 @section Known problems |
511 @cindex known bugs | 645 @cindex known bugs |
512 @cindex bugs, known | 646 @cindex bugs, known |
513 | 647 |
514 Below is a partial list of currently known problems with Eshell version | 648 Below is complete list of known problems with Eshell version 2.4.1, |
515 2.4, which is the version distributed with Emacs 21.1. | 649 which is the version included with Emacs 21.1. |
516 | 650 |
517 @table @asis | 651 @table @asis |
518 @item Differentiate between aliases and functions | 652 @item Differentiate between aliases and functions |
519 | 653 |
520 Allow for a bash-compatible syntax, such as: | 654 Allow for a bash-compatible syntax, such as: |
585 | 719 |
586 @item Input redirection is not supported | 720 @item Input redirection is not supported |
587 | 721 |
588 See the above entry. | 722 See the above entry. |
589 | 723 |
590 @item Problem running @command{less} without argument on Windows | 724 @item Problem running @command{less} without arguments on Windows |
591 | 725 |
592 The result in the Eshell buffer is: | 726 The result in the Eshell buffer is: |
593 | 727 |
594 @example | 728 @example |
595 Spawning child process: invalid argument | 729 Spawning child process: invalid argument |
780 @item Allow @samp{#<@var{word} @var{arg}>} as a generic syntax | 914 @item Allow @samp{#<@var{word} @var{arg}>} as a generic syntax |
781 | 915 |
782 With the handling of @emph{word} specified by an | 916 With the handling of @emph{word} specified by an |
783 @code{eshell-special-alist}. | 917 @code{eshell-special-alist}. |
784 | 918 |
785 @item In @code{eshell-eval-using-options}, allow a @code{:complete} tag | 919 @item In @code{eshell-veal-using-options}, allow a @code{:complete} tag |
786 | 920 |
787 It would be used to provide completion rules for that command. Then the | 921 It would be used to provide completion rules for that command. Then the |
788 macro will automagically define the completion function. | 922 macro will automagically define the completion function. |
789 | 923 |
790 @item For @code{eshell-command-on-region}, apply redirections to the result | 924 @item For @code{eshell-command-on-region}, apply redirections to the result |
892 @command{head} alias which assums an upper limit of | 1026 @command{head} alias which assums an upper limit of |
893 @code{eshell-maximum-line-length} characters per line. | 1027 @code{eshell-maximum-line-length} characters per line. |
894 | 1028 |
895 @item Make @command{dgrep} load @code{dired}, mark everything, then invoke @code{dired-do-search} | 1029 @item Make @command{dgrep} load @code{dired}, mark everything, then invoke @code{dired-do-search} |
896 | 1030 |
897 @item Write emsh.c | 1031 @item Write mesh.c |
898 | 1032 |
899 This would run Emacs with the appropriate arguments to invoke Eshell | 1033 This would run Emacs with the appropriate arguments to invoke Eshell |
900 only. That way, it could be listed as a login shell. | 1034 only. That way, it could be listed as a login shell. |
901 | 1035 |
902 @item Use an intangible @code{PS2} string for multi-line input prompts | 1036 @item Use an intangible @code{PS2} string for multi-line input prompts |