aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJim Porter2023-08-15 18:51:20 -0700
committerJim Porter2024-02-04 21:12:42 -0800
commit5c43ef86bf169a79b87bd082d2f884757f7c2efc (patch)
tree67af86528581973610588dee645dbc395bf5ded8
parentbe6de56906f0d1c09a0fad4f5165d864dddbc3ee (diff)
downloademacs-5c43ef86bf169a79b87bd082d2f884757f7c2efc.tar.gz
emacs-5c43ef86bf169a79b87bd082d2f884757f7c2efc.zip
Document arguments to Eshell's built-in commands
* lisp/eshell/em-unix.el (eshell/ln): LINK_NAME is required. * lisp/eshell/esh-ext.el (eshell/addpath): * lisp/eshell/esh-var.el (eshell/env): Improve help strings slightly. * doc/misc/eshell.texi (Scripts): Explain $0, $1, etc. (Dollars Expansion): Use "@dots{}" instead of "...". (Built-ins, Tramp extensions, Extra built-in commands): Document command-line arguments.
-rw-r--r--doc/misc/eshell.texi654
-rw-r--r--lisp/eshell/em-unix.el8
-rw-r--r--lisp/eshell/esh-ext.el6
-rw-r--r--lisp/eshell/esh-var.el2
4 files changed, 497 insertions, 173 deletions
diff --git a/doc/misc/eshell.texi b/doc/misc/eshell.texi
index da5e1ef1d03..5d3e5c7dbd6 100644
--- a/doc/misc/eshell.texi
+++ b/doc/misc/eshell.texi
@@ -481,72 +481,88 @@ loaded as part of the eshell-xtra module. @xref{Extension modules}.
481 481
482@table @code 482@table @code
483 483
484@item . 484@item . @var{file} [@var{argument}]@dots{}
485@cmindex . 485@cmindex .
486Source an Eshell file in the current environment. This is not to be 486Source an Eshell script named @var{file} in the current environment,
487confused with the command @command{source}, which sources a file in a 487passing any @var{arguments} to the script (@pxref{Scripts}). This is
488subshell environment. 488not to be confused with the command @command{source}, which sources a
489file in a subshell environment.
489 490
490@item addpath 491@item addpath
492@itemx addpath [-b] @var{directory}@dots{}
491@cmindex addpath 493@cmindex addpath
492Adds a given path or set of paths to the PATH environment variable, or, 494Adds each specified @var{directory} to the @code{$PATH} environment
493with no arguments, prints the current paths in this variable. 495variable. By default, this adds the directories to the end of
496@code{$PATH}, in the order they were passed on the command line; by
497passing @code{-b} or @code{--begin}, Eshell will instead add the
498directories to the beginning.
499
500With no directories, print the list of directories currently stored in
501@code{$PATH}.
494 502
495@item alias 503@item alias
504@itemx alias @var{name} [@var{command}]
496@cmindex alias 505@cmindex alias
497Define an alias (@pxref{Aliases}). This adds it to the aliases file. 506Define an alias named @var{name} and expanding to @var{command},
507adding it to the aliases file (@pxref{Aliases}). If @var{command} is
508omitted, delete the alias named @var{name}. With no arguments at all,
509list all the currently-defined aliases.
498 510
499@item basename 511@item basename @var{filename}
500@cmindex basename 512@cmindex basename
501Return a file name without its directory. 513Return @var{filename} without its directory.
502 514
503@item cat 515@item cat @var{file}@dots{}
504@cmindex cat 516@cmindex cat
505Concatenate file contents into standard output. If in a pipeline, or 517Concatenate the contents of @var{file}s to standard output. If in a
506if the file is not a regular file, directory, or symlink, then this 518pipeline, or if any of the files is not a regular file, directory, or
507command reverts to the system's definition of @command{cat}. 519symlink, then this command reverts to the system's definition of
520@command{cat}.
508 521
509@item cd 522@item cd
523@itemx cd @var{directory}
524@itemx cd -[@var{n}]
525@itemx cd =[@var{regexp}]
510@cmindex cd 526@cmindex cd
511This command changes the current working directory. Usually, it is 527Change the current working directory. This command can take several
512invoked as @kbd{cd @var{dir}} where @file{@var{dir}} is the new 528forms:
513working directory. But @command{cd} knows about a few special
514arguments:
515 529
516@itemize @minus{} 530@table @code
517@item
518When it receives no argument at all, it changes to the home directory.
519 531
520@item 532@item cd
521Giving the command @kbd{cd -} changes back to the previous working 533Change to the user's home directory.
522directory (this is the same as @kbd{cd $-}).
523 534
524@item 535@item cd @var{directory}
525The command @kbd{cd =} shows the directory ring. Each line is 536Change to the specified @var{directory}.
526numbered.
527 537
528@item 538@item cd -
529With @kbd{cd =foo}, Eshell searches the directory ring for a directory 539Change back to the previous working directory (this is the same as
530matching the regular expression @samp{foo}, and changes to that 540@kbd{cd $-}).
531directory.
532 541
533@item 542@item cd -@var{n}
534With @kbd{cd -42}, you can access the directory stack slots by number. 543Change to the directory in the @var{nth} slot of the directory stack.
544
545@item cd =
546Show the directory ring. Each line is numbered.
547
548@item cd =@var{regexp}
549Search the directory ring for a directory matching the regular
550expression @var{regexp} and change to that directory.
551
552@end table
535 553
536@item
537@vindex eshell-cd-shows-directory 554@vindex eshell-cd-shows-directory
538@vindex eshell-list-files-after-cd 555@vindex eshell-list-files-after-cd
539If @code{eshell-cd-shows-directory} is non-@code{nil}, @command{cd} 556If @code{eshell-cd-shows-directory} is non-@code{nil}, @command{cd}
540will report the directory it changes to. If 557will report the directory it changes to. If
541@code{eshell-list-files-after-cd} is non-@code{nil}, then @command{ls} 558@code{eshell-list-files-after-cd} is non-@code{nil}, then @command{ls}
542is called with any remaining arguments after changing directories. 559is called with any remaining arguments after changing directories.
543@end itemize
544 560
545@item clear 561@item clear [@var{scrollback}]
546@cmindex clear 562@cmindex clear
547Scrolls the contents of the Eshell window out of sight, leaving a 563Scrolls the contents of the Eshell window out of sight, leaving a
548blank window. If provided with an optional non-@code{nil} argument, 564blank window. If @var{scrollback} is non-@code{nil}, the scrollback
549the scrollback contents are cleared instead. 565contents are cleared instead, as with @command{clear-scrollback}.
550 566
551@item clear-scrollback 567@item clear-scrollback
552@cmindex clear-scrollback 568@cmindex clear-scrollback
@@ -554,21 +570,30 @@ Clear the scrollback contents of the Eshell window. Unlike the
554command @command{clear}, this command deletes content in the Eshell 570command @command{clear}, this command deletes content in the Eshell
555buffer. 571buffer.
556 572
557@item compile 573@item compile [-p | -i] [-m @var{mode-name}] @var{command}@dots{}
558@cmindex compile 574@cmindex compile
559Run an external command, sending its output to a compilation buffer if 575Run an external command, sending its output to a compilation buffer if
560the command would output to the screen and is not part of a pipeline 576the command would output to the screen and is not part of a pipeline
561or subcommand. This is particularly useful when defining aliases, so 577or subcommand.
578
579With the @code{-p} or @code{--plain} options, always send the output
580to the Eshell buffer; similarly, with @code{-i} or
581@code{--interactive}, always send the output to a compilation buffer.
582You can also set the mode of the compilation buffer with @code{-m
583@var{mode-name}} or @code{--mode @var{mode-name}}.
584
585@command{compile} is particularly useful when defining aliases, so
562that interactively, the output shows up in a compilation buffer, but 586that interactively, the output shows up in a compilation buffer, but
563you can still pipe the output elsewhere if desired. For example, if 587you can still pipe the output elsewhere if desired. For example, if
564you have a grep-like command on your system, you might define an alias 588you have a grep-like command on your system, you might define an alias
565for it like so: @samp{alias mygrep 'compile --mode=grep-mode -- mygrep 589for it like so: @samp{alias mygrep 'compile --mode=grep-mode -- mygrep
566$*'}. 590$*'}.
567 591
568@item cp 592@item cp [@var{option}@dots{}] @var{source} @var{dest}
593@item cp [@var{option}@dots{}] @var{source}@dots{} @var{directory}
569@cmindex cp 594@cmindex cp
570Copy a file to a new location or copy multiple files to the same 595Copy the file @var{source} to @var{dest} or @var{source} into
571directory. 596@var{directory}.
572 597
573@vindex eshell-cp-overwrite-files 598@vindex eshell-cp-overwrite-files
574@vindex eshell-cp-interactive-query 599@vindex eshell-cp-interactive-query
@@ -577,26 +602,59 @@ If @code{eshell-cp-overwrite-files} is non-@code{nil}, then
577@code{eshell-cp-interactive-query} is non-@code{nil}, then 602@code{eshell-cp-interactive-query} is non-@code{nil}, then
578@command{cp} will ask before overwriting anything. 603@command{cp} will ask before overwriting anything.
579 604
580@item date 605@command{cp} accepts the following options:
606
607@table @asis
608
609@item @code{-a}, @code{--archive}
610Equivalent to @code{--no-dereference --preserve --recursive}.
611
612@item @code{-d}, @code{--no-dereference}
613Don't dereference symbolic links when copying; instead, copy the link
614itself.
615
616@item @code{-f}, @code{--force}
617Never prompt for confirmation before copying a file.
618
619@item @code{-i}, @code{--interactive}
620Prompt for confirmation before copying a file if the target already
621exists.
622
623@item @code{-n}, @code{--preview}
624Run the command, but don't copy anything. This is useful if you
625want to preview what would be removed when calling @command{cp}.
626
627@item @code{-p}, @code{--preserve}
628Attempt to preserve file attributes when copying.
629
630@item @code{-r}, @code{-R}, @code{--recursive}
631Copy any specified directories and their contents recursively.
632
633@item @code{-v}, @code{--verbose}
634Print the name of each file before copying it.
635
636@end table
637
638@item date [@var{specified-time} [@var{zone}]]
581@cmindex date 639@cmindex date
582Print the current local time as a human-readable string. This command 640Print the current local time as a human-readable string. This command
583is similar to, but slightly different from, the GNU Coreutils 641is an alias to the Emacs Lisp function @code{current-time-string}
584@command{date} command. 642(@pxref{Time of Day,,, elisp, GNU Emacs Lisp Reference Manual}).
585 643
586@item diff 644@item diff [@var{option}]@dots{} @var{old} @var{new}
587@cmindex diff 645@cmindex diff
588Compare files using Emacs's internal @code{diff} (not to be confused 646Compare the files @var{old} and @var{new} using Emacs's internal
589with @code{ediff}). @xref{Comparing Files, , , emacs, The GNU Emacs 647@code{diff} (not to be confused with @code{ediff}). @xref{Comparing
590Manual}. 648Files, , , emacs, The GNU Emacs Manual}.
591 649
592@vindex eshell-plain-diff-behavior 650@vindex eshell-plain-diff-behavior
593If @code{eshell-plain-diff-behavior} is non-@code{nil}, then this 651If @code{eshell-plain-diff-behavior} is non-@code{nil}, then this
594command does not use Emacs's internal @code{diff}. This is the same 652command does not use Emacs's internal @code{diff}. This is the same
595as using @samp{alias diff '*diff $@@*'}. 653as using @samp{alias diff '*diff $@@*'}.
596 654
597@item dirname 655@item dirname @var{filename}
598@cmindex dirname 656@cmindex dirname
599Return the directory component of a file name. 657Return the directory component of @var{filename}.
600 658
601@item dirs 659@item dirs
602@cmindex dirs 660@cmindex dirs
@@ -604,25 +662,75 @@ Prints the directory stack. Directories can be added or removed from
604the stack using the commands @command{pushd} and @command{popd}, 662the stack using the commands @command{pushd} and @command{popd},
605respectively. 663respectively.
606 664
607@item du 665@item du [@var{option}]@dots{} @var{file}@dots{}
608@cmindex du 666@cmindex du
609Summarize disk usage for each file. 667Summarize disk usage for each file, recursing into directories.
668
669@command{du} accepts the following options:
670
671@table @asis
672
673@item @code{-a}, @code{--all}
674Print sizes for files, not just directories.
610 675
611@item echo 676@item @code{--block-size=@var{size}}
677Print sizes as number of blocks of size @var{size}.
678
679@item @code{-b}, @code{--bytes}
680Print file sizes in bytes.
681
682@item @code{-c}, @code{--total}
683Print a grand total of the sizes at the end.
684
685@item @code{-d}, @code{--max-depth=@var{depth}}
686Only print sizes for directories (or files with @code{--all}) that are
687@var{depth} or fewer levels below the command line arguments.
688
689@item @code{-h}, @code{--human-readable}
690Print sizes in human-readable format, with binary prefixes (so 1 KB is
6911024 bytes).
692
693@item @code{-H}, @code{--si}
694Print sizes in human-readable format, with decimal prefixes (so 1 KB
695is 1000 bytes).
696
697@item @code{-k}, @code{--kilobytes}
698Print file sizes in kilobytes (like @code{--block-size=1024}).
699
700@item @code{-L}, @code{--dereference}
701Follow symbolic links when traversing files.
702
703@item @code{-m}, @code{--megabytes}
704Print file sizes in megabytes (like @code{--block-size=1048576}).
705
706@item @code{-s}, @code{--summarize}
707Don't recurse into subdirectories (like @code{--max-depth=0}).
708
709@item @code{-x}, @code{--one-file-system}
710Skip any directories that reside on different filesystems.
711
712@end table
713
714@item echo [-n | -N] [@var{arg}]@dots{}
612@cmindex echo 715@cmindex echo
613Echoes its input. By default, this prints in a Lisp-friendly fashion 716Prints the value of each @var{arg}. By default, this prints in a
614(so that the value is useful to a Lisp command using the result of 717Lisp-friendly fashion (so that the value is useful to a Lisp command
615@command{echo} as an argument). If a single argument is passed, 718using the result of @command{echo} as an argument). If a single
616@command{echo} prints that; if multiple arguments are passed, it 719argument is passed, @command{echo} prints that; if multiple arguments
617prints a list of all the arguments; otherwise, it prints the empty 720are passed, it prints a list of all the arguments; otherwise, it
618string. 721prints the empty string.
619 722
620@vindex eshell-plain-echo-behavior 723@vindex eshell-plain-echo-behavior
621If @code{eshell-plain-echo-behavior} is non-@code{nil}, @command{echo} 724If @code{eshell-plain-echo-behavior} is non-@code{nil}, @command{echo}
622will try to behave more like a plain shell's @command{echo}, printing 725will try to behave more like a plain shell's @command{echo}, printing
623each argument as a string, separated by a space. 726each argument as a string, separated by a space.
624 727
625@item env 728You can control whether @command{echo} outputs a trailing newline
729using @code{-n} to disable the trailing newline (the default behavior)
730or @code{-N} to enable it (the default when
731@code{eshell-plain-echo-behavior} is non-@code{nil}).
732
733@item env [@var{var}=@var{value}]@dots{} [@var{command}]@dots{}
626@cmindex env 734@cmindex env
627With no arguments, print the current environment variables. If you 735With no arguments, print the current environment variables. If you
628pass arguments to this command, then @command{env} will execute the 736pass arguments to this command, then @command{env} will execute the
@@ -630,7 +738,7 @@ arguments as a command. If you pass any initial arguments of the form
630@samp{@var{var}=@var{value}}, @command{env} will first set @var{var} 738@samp{@var{var}=@var{value}}, @command{env} will first set @var{var}
631to @var{value} before running the command. 739to @var{value} before running the command.
632 740
633@item eshell-debug 741@item eshell-debug [error | form | process]@dots{}
634@cmindex eshell-debug 742@cmindex eshell-debug
635Toggle debugging information for Eshell itself. You can pass this 743Toggle debugging information for Eshell itself. You can pass this
636command one or more of the following arguments: 744command one or more of the following arguments:
@@ -658,65 +766,86 @@ Exit Eshell and save the history. By default, this command kills the
658Eshell buffer, but if @code{eshell-kill-on-exit} is @code{nil}, then 766Eshell buffer, but if @code{eshell-kill-on-exit} is @code{nil}, then
659the buffer is merely buried instead. 767the buffer is merely buried instead.
660 768
661@item export 769@item export [@var{name}=@var{value}]@dots{}
662@cmindex export 770@cmindex export
663Set environment variables using input like Bash's @command{export}, as 771Set environment variables using input like Bash's @command{export}, as
664in @samp{export @var{var1}=@var{val1} @var{var2}=@var{val2} @dots{}}. 772in @samp{export @var{var1}=@var{val1} @var{var2}=@var{val2} @dots{}}.
665 773
666@item grep 774@item grep [@var{arg}]@dots{}
667@cmindex grep 775@cmindex grep
668@itemx agrep 776@itemx agrep [@var{arg}]@dots{}
669@cmindex agrep 777@cmindex agrep
670@itemx egrep 778@itemx egrep [@var{arg}]@dots{}
671@cmindex egrep 779@cmindex egrep
672@itemx fgrep 780@itemx fgrep [@var{arg}]@dots{}
673@cmindex fgrep 781@cmindex fgrep
674@itemx rgrep 782@itemx rgrep [@var{arg}]@dots{}
675@cmindex rgrep 783@cmindex rgrep
676@itemx glimpse 784@itemx glimpse [@var{arg}]@dots{}
677@cmindex glimpse 785@cmindex glimpse
678The @command{grep} commands are compatible with GNU @command{grep}, 786The @command{grep} commands are compatible with GNU @command{grep},
679but use Emacs's internal @code{grep} instead. 787but open a compilation buffer in @code{grep-mode} instead.
680@xref{Grep Searching, , , emacs, The GNU Emacs Manual}. 788@xref{Grep Searching, , , emacs, The GNU Emacs Manual}.
681 789
682@vindex eshell-plain-grep-behavior 790@vindex eshell-plain-grep-behavior
683If @code{eshell-plain-grep-behavior} is non-@code{nil}, then these 791If @code{eshell-plain-grep-behavior} is non-@code{nil}, then these
684commands do not use Emacs's internal @code{grep}. This is the same as 792commands do not use open a compilation buffer, instead printing output
685using @samp{alias grep '*grep $@@*'}, though this setting applies to 793to Eshell's buffer. This is the same as using @samp{alias grep '*grep
686all of the built-in commands for which you would need to create a 794$@@*'}, though this setting applies to all of the built-in commands
687separate alias. 795for which you would need to create a separate alias.
688 796
689@item history 797@item history [@var{n}]
798@itemx history [-arw] [@var{filename}]
690@cmindex history 799@cmindex history
691Prints Eshell's input history. With a numeric argument @var{N}, this 800Prints Eshell's input history. With a numeric argument @var{n}, this
692command prints the @var{N} most recent items in the history. 801command prints the @var{n} most recent items in the history.
802Alternately, you can specify the following options:
803
804@table @asis
805
806@item @code{-a}, @code{--append}
807Append new history items to the history file.
693 808
694@item info 809@item @code{-r}, @code{--read}
810Read history items from the history file and append them to the
811current shell's history.
812
813@item @code{-w}, @code{--write}
814Write the current history list to the history file.
815
816@end table
817
818@item info [@var{manual} [@var{item}]@dots{}]
695@cmindex info 819@cmindex info
696Browse the available Info documentation. This command is the same as 820Browse the available Info documentation. With no arguments, browse
697the external @command{info} command, but uses Emacs's internal Info 821the top-level menu. Otherwise, show the manual for @var{manual},
698reader. 822selecting the menu entry for @var{item}.
699@xref{Misc Help, , , emacs, The GNU Emacs Manual}. 823
824This command is the same as the external @command{info} command, but
825uses Emacs's internal Info reader. @xref{Misc Help, , , emacs, The
826GNU Emacs Manual}.
700 827
701@item jobs 828@item jobs
702@cmindex jobs 829@cmindex jobs
703List subprocesses of the Emacs process, if any, using the function 830List subprocesses of the Emacs process, if any, using the function
704@code{list-processes}. 831@code{list-processes}.
705 832
706@item kill 833@item kill [-@var{signal}] [@var{pid} | @var{process}]
707@cmindex kill 834@cmindex kill
708Kill processes. Takes a PID or a process object and an optional 835Kill processes. Takes a PID or a process object and an optional
709signal specifier which can either be a number or a signal name. 836@var{signal} specifier which can either be a number or a signal name.
710 837
711@item listify 838@item listify [@var{arg}]@dots{}
712@cmindex listify 839@cmindex listify
713Eshell version of @code{list}. Allows you to create a list using Eshell 840Return the arguments as a single list. With a single argument, return
714syntax, rather than Elisp syntax. For example, @samp{listify foo bar} 841it as-is if it's already a list, or otherwise wrap it in a list. With
715and @code{("foo" "bar")} both evaluate to @code{("foo" "bar")}. 842multiple arguments, return a list of all of them.
716 843
717@item ln 844@item ln [@var{option}]@dots{} @var{target} [@var{link-name}]
845@itemx ln [@var{option}]@dots{} @var{target}@dots{} @var{directory}
718@cmindex ln 846@cmindex ln
719Create links to files. 847Create a link to the specified @var{target} named @var{link-name} or
848create links to multiple @var{targets} in @var{directory}.
720 849
721@vindex eshell-ln-overwrite-files 850@vindex eshell-ln-overwrite-files
722@vindex eshell-ln-interactive-query 851@vindex eshell-ln-interactive-query
@@ -725,7 +854,30 @@ will overwrite files without warning. If
725@code{eshell-ln-interactive-query} is non-@code{nil}, then 854@code{eshell-ln-interactive-query} is non-@code{nil}, then
726@command{ln} will ask before overwriting files. 855@command{ln} will ask before overwriting files.
727 856
728@item locate 857@command{ln} accepts the following options:
858
859@table @asis
860
861@item @code{-f}, @code{--force}
862Never prompt for confirmation before linking a target.
863
864@item @code{-i}, @code{--interactive}
865Prompt for confirmation before linking to an item if the source
866already exists.
867
868@item @code{-n}, @code{--preview}
869Run the command, but don't move anything. This is useful if you
870want to preview what would be linked when calling @command{ln}.
871
872@item @code{-s}, @code{--symbolic}
873Make symbolic links instead of hard links.
874
875@item @code{-v}, @code{--verbose}
876Print the name of each file before linking it.
877
878@end table
879
880@item locate @var{arg}@dots{}
729@cmindex locate 881@cmindex locate
730Alias to Emacs's @code{locate} function, which simply runs the external 882Alias to Emacs's @code{locate} function, which simply runs the external
731@command{locate} command and parses the results. 883@command{locate} command and parses the results.
@@ -736,51 +888,129 @@ If @code{eshell-plain-locate-behavior} is non-@code{nil}, then Emacs's
736internal @code{locate} is not used. This is the same as using 888internal @code{locate} is not used. This is the same as using
737@samp{alias locate '*locate $@@*'}. 889@samp{alias locate '*locate $@@*'}.
738 890
739@item ls 891@item ls [@var{option}]@dots{} [@var{file}]@dots{}
740@cmindex ls 892@cmindex ls
741Lists the contents of directories. 893List information about each @var{file}, including the contents of any
894specified directories. If @var{file} is unspecified, list the
895contents of the current directory.
896
897@vindex eshell-ls-initial-args
898The user option @code{eshell-ls-initial-args} contains a list of
899arguments to include with any call to @command{ls}. For example, you
900can include the option @option{-h} to always use a more human-readable
901format.
742 902
743@vindex eshell-ls-use-colors 903@vindex eshell-ls-use-colors
744If @code{eshell-ls-use-colors} is non-@code{nil}, the contents of a 904If @code{eshell-ls-use-colors} is non-@code{nil}, the contents of a
745directory is color-coded according to file type and status. These 905directory is color-coded according to file type and status. These
746colors and the regexps used to identify their corresponding files can 906colors and the regexps used to identify their corresponding files can
747be customized via @w{@kbd{M-x customize-group @key{RET} eshell-ls @key{RET}}}. 907be customized via @w{@kbd{M-x customize-group @key{RET} eshell-ls
908@key{RET}}}.
909
910@command{ls} supports the following options:
911
912@table @asis
913
914@item @code{-a}, @code{--all}
915List all files, including ones starting with @samp{.}.
916
917@item @code{-A}, @code{--almost-all}
918Like @code{--all}, but don't list the current directory (@file{.}) or
919the parent directory (@file{..}).
920
921@item @code{-c}, @code{--by-ctime}
922Sort files by last status change time, with newest files first.
923
924@item @code{-C}
925List entries by columns.
926
927@item @code{-d}, @code{--directory}
928List directory entries instead of their contents.
929
930@item @code{-h}, @code{--human-readable}
931Print sizes in human-readable format, with binary prefixes (so 1 KB is
9321024 bytes).
933
934@item @code{-H}, @code{--si}
935Print sizes in human-readable format, with decimal prefixes (so 1 KB
936is 1000 bytes).
937
938@item @code{-I@var{pattern}}, @code{--ignore=@var{pattern}}
939Don't list directory entries matching @var{pattern}.
940
941@item @code{-k}, @code{--kilobytes}
942Print sizes as 1024-byte kilobytes.
748 943
749@vindex eshell-ls-date-format 944@vindex eshell-ls-date-format
750The user option @code{eshell-ls-date-format} determines how the date 945@item @code{-l}
751is displayed when using the @option{-l} option. The date is produced 946Use a long listing format showing details for each file. The user
752using the function @code{format-time-string} (@pxref{Time Parsing,,, 947option @code{eshell-ls-date-format} determines how the date is
753elisp, GNU Emacs Lisp Reference Manual}). 948displayed when using this option. The date is produced using the
949function @code{format-time-string} (@pxref{Time Parsing,,, elisp, GNU
950Emacs Lisp Reference Manual}).
754 951
755@vindex eshell-ls-initial-args 952@item @code{-L}, @code{--dereference}
756The user option @code{eshell-ls-initial-args} contains a list of 953Follow symbolic links when listing entries.
757arguments to include with any call to @command{ls}. For example, you 954
758can include the option @option{-h} to always use a more human-readable 955@item @code{-n}, @code{--numeric-uid-gid}
759format. 956Show UIDs and GIDs numerically, instead of using their names.
957
958@item @code{-r}, @code{--reverse}
959Reverse order when sorting.
960
961@item @code{-R}, @code{--recursive}
962List subdirectories recursively.
963
964@item @code{-s}, @code{--size}
965Show the size of each file in blocks.
760 966
761@vindex eshell-ls-default-blocksize 967@vindex eshell-ls-default-blocksize
762The user option @code{eshell-ls-default-blocksize} determines the 968@item @code{-S}
763default blocksize used when displaying file sizes with the option 969Sort by file size, with largest files first. The user option
764@option{-s}. 970@code{eshell-ls-default-blocksize} determines the default blocksize
971used when displaying file sizes with this option.
972
973@item @code{-t}
974Sort by modification time, with newest files first.
765 975
766@item make 976@item @code{-u}
977Sort by last access time, with newest files first.
978
979@item @code{-U}
980Do not sort results. Instead, list entries in their directory order.
981
982@item @code{-x}
983List entries by lines instead of by columns.
984
985@item @code{-X}
986Sort alphabetically by file extension.
987
988@item @code{-1}
989List one file per line.
990
991@end table
992
993@item make [@var{arg}]@dots{}
767@cmindex make 994@cmindex make
768Run @command{make} through @code{compile} when run asynchronously 995Run @command{make} through @code{compile} when run asynchronously
769(e.g., @samp{make &}). @xref{Compilation, , , emacs, The GNU Emacs 996(e.g., @samp{make &}). @xref{Compilation, , , emacs, The GNU Emacs
770Manual}. Otherwise call the external @command{make} command. 997Manual}. Otherwise call the external @command{make} command.
771 998
772@item man 999@item man [@var{arg}]@dots{}
773@cmindex man 1000@cmindex man
774Display Man pages using the Emacs @code{man} command. 1001Display Man pages using the Emacs @code{man} command.
775@xref{Man Page, , , emacs, The GNU Emacs Manual}. 1002@xref{Man Page, , , emacs, The GNU Emacs Manual}.
776 1003
777@item mkdir 1004@item mkdir [-p] @var{directory}@dots{}
778@cmindex mkdir 1005@cmindex mkdir
779Make new directories. 1006Make new directories. With @code{-p} or @code{--parents},
1007automatically make any necessary parent directories as well.
780 1008
781@item mv 1009@item mv [@var{option}]@dots{} @var{source} @var{dest}
1010@itemx mv [@var{option}]@dots{} @var{source}@dots{} @var{directory}
782@cmindex mv 1011@cmindex mv
783Move or rename files. 1012Rename the file @var{source} to @var{dest} or move @var{source} into
1013@var{directory}.
784 1014
785@vindex eshell-mv-overwrite-files 1015@vindex eshell-mv-overwrite-files
786@vindex eshell-mv-interactive-query 1016@vindex eshell-mv-interactive-query
@@ -789,40 +1019,93 @@ will overwrite files without warning. If
789@code{eshell-mv-interactive-query} is non-@code{nil}, @command{mv} 1019@code{eshell-mv-interactive-query} is non-@code{nil}, @command{mv}
790will prompt before overwriting anything. 1020will prompt before overwriting anything.
791 1021
792@item occur 1022@command{mv} accepts the following options:
1023
1024@table @asis
1025
1026@item @code{-f}, @code{--force}
1027Never prompt for confirmation before moving an item.
1028
1029@item @code{-i}, @code{--interactive}
1030Prompt for confirmation before moving an item if the target already
1031exists.
1032
1033@item @code{-n}, @code{--preview}
1034Run the command, but don't move anything. This is useful if you
1035want to preview what would be moved when calling @command{mv}.
1036
1037@item @code{-v}, @code{--verbose}
1038Print the name of each item before moving it.
1039
1040@end table
1041
1042@item occur @var{regexp} [@var{nlines}]
793@cmindex occur 1043@cmindex occur
794Alias to Emacs's @code{occur}. 1044Alias to Emacs's @code{occur}.
795@xref{Other Repeating Search, , , emacs, The GNU Emacs Manual}. 1045@xref{Other Repeating Search, , , emacs, The GNU Emacs Manual}.
796 1046
797@item popd 1047@item popd
1048@item popd +@var{n}
798@cmindex popd 1049@cmindex popd
799Pop a directory from the directory stack and switch to a another place 1050Pop a directory from the directory stack and switch to a another place
800in the stack. 1051in the stack. This command can take the following forms:
801 1052
802@item printnl 1053@table @code
1054
1055@item popd
1056Remove the current directory from the directory stack and change to
1057the directory beneath it.
1058
1059@item popd +@var{n}
1060Remove the current directory from the directory stack and change to
1061the @var{nth} directory in the stack (counting from zero).
1062
1063@end table
1064
1065@item printnl [@var{arg}]@dots{}
803@cmindex printnl 1066@cmindex printnl
804Print the arguments separated by newlines. 1067Print all the @var{arg}s separated by newlines.
805 1068
806@item pushd 1069@item pushd
1070@itemx pushd @var{directory}
1071@itemx pushd +@var{n}
807@cmindex pushd 1072@cmindex pushd
808Push the current directory onto the directory stack, then change to 1073Push the current directory onto the directory stack, then change to
809another directory. 1074another directory. This command can take the following forms:
1075
1076@table @code
1077
1078@vindex eshell-pushd-tohome
1079@item pushd
1080Swap the current directory with the directory on the top of the stack.
1081If @code{eshell-pushd-tohome} is non-@code{nil}, push the current
1082directory onto the stack and change to the user's home directory (like
1083@samp{pushd ~}).
810 1084
811@vindex eshell-pushd-dunique 1085@vindex eshell-pushd-dunique
1086@item pushd @var{directory}
1087Push the current directory onto the stack and change to
1088@var{directory}. If @code{eshell-pushd-dunique} is non-@code{nil},
1089then only unique directories will be added to the stack.
1090
812@vindex eshell-pushd-dextract 1091@vindex eshell-pushd-dextract
813If @code{eshell-pushd-dunique} is non-@code{nil}, then only unique 1092@item pushd +@var{n}
814directories will be added to the stack. If 1093Change to the @var{nth} directory in the directory stack (counting
815@code{eshell-pushd-dextract} is non-@code{nil}, then @samp{pushd 1094from zero), and ``rotate'' the stack by moving any elements before the
816+@var{n}} will pop the @var{n}th directory to the top of the stack. 1095@var{nth} to the bottom. If @code{eshell-pushd-dextract} is
1096non-@code{nil}, then @samp{pushd +@var{n}} will instead pop the
1097@var{n}th directory to the top of the stack.
1098
1099@end table
817 1100
818@item pwd 1101@item pwd
819@cmindex pwd 1102@cmindex pwd
820Prints the current working directory. 1103Prints the current working directory.
821 1104
822@item rm 1105@item rm [@var{option}]@dots{} @var{item}@dots{}
823@cmindex rm 1106@cmindex rm
824Removes files, buffers, processes, or Emacs Lisp symbols, depending on 1107Removes files, buffers, processes, or Emacs Lisp symbols, depending on
825the argument. 1108the type of each @var{item}.
826 1109
827@vindex eshell-rm-interactive-query 1110@vindex eshell-rm-interactive-query
828@vindex eshell-rm-removes-directories 1111@vindex eshell-rm-removes-directories
@@ -832,56 +1115,84 @@ will prompt before removing anything. If
832@command{rm} can also remove directories. Otherwise, @command{rmdir} 1115@command{rm} can also remove directories. Otherwise, @command{rmdir}
833is required. 1116is required.
834 1117
835@item rmdir 1118@command{rm} accepts the following options:
1119
1120@table @asis
1121
1122@item @code{-f}, @code{--force}
1123Never prompt for confirmation before removing an item.
1124
1125@item @code{-i}, @code{--interactive}
1126Prompt for confirmation before removing each item.
1127
1128@item @code{-n}, @code{--preview}
1129Run the command, but don't remove anything. This is useful if you
1130want to preview what would be removed when calling @command{rm}.
1131
1132@item @code{-r}, @code{-R}, @code{--recursive}
1133Remove any specified directories and their contents recursively.
1134
1135@item @code{-v}, @code{--verbose}
1136Print the name of each item before removing it.
1137
1138@end table
1139
1140@item rmdir @var{directory}@dots{}
836@cmindex rmdir 1141@cmindex rmdir
837Removes directories if they are empty. 1142Removes directories if they are empty.
838 1143
839@item set 1144@item set [@var{var} @var{value}]@dots{}
840@cmindex set 1145@cmindex set
841Set variable values, using the function @code{set} like a command 1146Set variable values, using the function @code{set} like a command
842(@pxref{Setting Variables,,, elisp, GNU Emacs Lisp Reference Manual}). 1147(@pxref{Setting Variables,,, elisp, GNU Emacs Lisp Reference Manual}).
843A variable name can be a symbol, in which case it refers to a Lisp 1148The value of @var{var} can be a symbol, in which case it refers to a
844variable, or a string, referring to an environment variable 1149Lisp variable, or a string, referring to an environment variable
845(@pxref{Arguments}). 1150(@pxref{Arguments}).
846 1151
847@item setq 1152@item setq [@var{symbol} @var{value}]@dots{}
848@cmindex setq 1153@cmindex setq
849Set variable values, using the function @code{setq} like a command 1154Set variable values, using the function @code{setq} like a command
850(@pxref{Setting Variables,,, elisp, GNU Emacs Lisp Reference Manual}). 1155(@pxref{Setting Variables,,, elisp, GNU Emacs Lisp Reference Manual}).
851 1156
852@item source 1157@item source @var{file} [@var{argument}]@dots{}
853@cmindex source 1158@cmindex source
854Source an Eshell file in a subshell environment. This is not to be 1159Source an Eshell script named @var{file} in a subshell environment,
855confused with the command @command{.}, which sources a file in the 1160passing any @var{argument}s to the script (@pxref{Scripts}). This is
856current environment. 1161not to be confused with the command @command{.}, which sources a file
1162in the current environment.
857 1163
858@item time 1164@item time @var{command}@dots{}
859@cmindex time 1165@cmindex time
860Show the time elapsed during a command's execution. 1166Show the time elapsed during the execution of @var{command}.
861 1167
862@item umask 1168@item umask [-S]
1169@itemx umask @var{mode}
863@cmindex umask 1170@cmindex umask
864Set or view the default file permissions for newly created files and 1171View the default file permissions for newly created files and
865directories. 1172directories. If you pass @code{-S} or @code{--symbolic}, view the
1173mode symbolically. With @var{mode}, set the default permissions to
1174this value.
866 1175
867@item unset 1176@item unset [@var{var}]@dots{}
868@cmindex unset 1177@cmindex unset
869Unset one or more variables. As with @command{set}, a variable name 1178Unset one or more variables. As with @command{set}, the value of
870can be a symbol, in which case it refers to a Lisp variable, or a 1179@var{var} can be a symbol, in which case it refers to a Lisp variable,
871string, referring to an environment variable. 1180or a string, referring to an environment variable.
872 1181
873@item wait 1182@item wait [@var{process}]@dots{}
874@cmindex wait 1183@cmindex wait
875Wait until a process has successfully completed. 1184Wait until each specified @var{process} has exited.
876 1185
877@item which 1186@item which @var{command}@dots{}
878@cmindex which 1187@cmindex which
879Identify a command and its location. 1188For each @var{command}, identify what kind of command it is and its
1189location.
880 1190
881@item whoami 1191@item whoami
882@cmindex whoami 1192@cmindex whoami
883Print the current user. This Eshell version of @command{whoami} 1193Print the current user. This Eshell version of @command{whoami} is
884supports Tramp. 1194connection-aware, so for remote directories, it will print the user
1195associated with that connection.
885@end table 1196@end table
886 1197
887@subsection Defining new built-in commands 1198@subsection Defining new built-in commands
@@ -1353,6 +1664,11 @@ sequence of commands, as with almost any other shell script. Scripts
1353are invoked from Eshell with @command{source}, or from anywhere in Emacs 1664are invoked from Eshell with @command{source}, or from anywhere in Emacs
1354with @code{eshell-source-file}. 1665with @code{eshell-source-file}.
1355 1666
1667Like with aliases (@pxref{Aliases}), Eshell scripts can accept any
1668number of arguments. Within the script, you can refer to these with
1669the special variables @code{$0}, @code{$1}, @dots{}, @code{$9}, and
1670@code{$*}.
1671
1356@cmindex . 1672@cmindex .
1357If you wish to load a script into your @emph{current} environment, 1673If you wish to load a script into your @emph{current} environment,
1358rather than in a subshell, use the @code{.} command. 1674rather than in a subshell, use the @code{.} command.
@@ -1452,7 +1768,7 @@ As with @samp{$@{@var{command}@}}, evaluates the Eshell command invocation
1452@command{@var{command}}, but writes the output to a temporary file and 1768@command{@var{command}}, but writes the output to a temporary file and
1453returns the file name. 1769returns the file name.
1454 1770
1455@item $@var{expr}[@var{i...}] 1771@item $@var{expr}[@var{i@dots{}}]
1456Expands to the @var{i}th element of the result of @var{expr}, an 1772Expands to the @var{i}th element of the result of @var{expr}, an
1457expression in one of the above forms listed here. If multiple indices 1773expression in one of the above forms listed here. If multiple indices
1458are supplied, this will return a list containing the elements for each 1774are supplied, this will return a list containing the elements for each
@@ -1501,7 +1817,7 @@ Multiple sets of indices can also be specified. For example, if
1501expand to @code{2}, i.e.@: the second element of the first list member 1817expand to @code{2}, i.e.@: the second element of the first list member
1502(all indices are zero-based). 1818(all indices are zero-based).
1503 1819
1504@item $@var{expr}[@var{regexp} @var{i...}] 1820@item $@var{expr}[@var{regexp} @var{i@dots{}}]
1505As above (when @var{expr} expands to a string), but use @var{regexp} 1821As above (when @var{expr} expands to a string), but use @var{regexp}
1506to split the string. @var{regexp} can be any form other than a 1822to split the string. @var{regexp} can be any form other than a
1507number. For example, @samp{$@var{var}[: 0]} will return the first 1823number. For example, @samp{$@var{var}[: 0]} will return the first
@@ -2275,15 +2591,23 @@ external commands. To enable it, add @code{eshell-tramp} to
2275 2591
2276@table @code 2592@table @code
2277 2593
2278@item su 2594@item su [- | -l] [@var{user}]
2279@cmindex su 2595@cmindex su
2280@itemx sudo 2596Uses TRAMP's @command{su} method (@pxref{Inline methods, , , tramp,
2597The Tramp Manual}) to change the current user to @var{user} (or root
2598if unspecified). With @code{-}, @code{-l}, or @code{--login}, provide
2599a login environment.
2600
2601@item sudo [-u @var{user}] [-s | @var{command}@dots{}]
2281@cmindex sudo 2602@cmindex sudo
2282@itemx doas 2603@itemx doas [-u @var{user}] [-s | @var{command}@dots{}]
2283@cmindex doas 2604@cmindex doas
2284Uses TRAMP's @command{su}, @command{sudo}, or @command{doas} method 2605Uses TRAMP's @command{sudo} or @command{doas} method (@pxref{Inline
2285(@pxref{Inline methods, , , tramp, The Tramp Manual}) to run a command 2606methods, , , tramp, The Tramp Manual}) to run @var{command} as root
2286via @command{su}, @command{sudo}, or @command{doas}. 2607via @command{sudo} or @command{doas}. When specifying @code{-u
2608@var{user}} or @code{--user @var{user}}, run the command as @var{user}
2609instead. With @code{-s} or @code{--shell}, start a shell instead of
2610running @var{command}.
2287 2611
2288@end table 2612@end table
2289 2613
@@ -2296,58 +2620,58 @@ add @code{eshell-xtra} to @code{eshell-modules-list}.
2296 2620
2297@table @code 2621@table @code
2298 2622
2299@item count 2623@item count @var{item} @var{seq} [@var{option}]@dots{}
2300@cmindex count 2624@cmindex count
2301A wrapper around the function @code{cl-count} (@pxref{Searching 2625A wrapper around the function @code{cl-count} (@pxref{Searching
2302Sequences,,, cl, GNU Emacs Common Lisp Emulation}). This command can 2626Sequences,,, cl, GNU Emacs Common Lisp Emulation}). This command can
2303be used for comparing lists of strings. 2627be used for comparing lists of strings.
2304 2628
2305@item expr 2629@item expr @var{str} [@var{separator}] [@var{arg}]@dots{}
2306@cmindex expr 2630@cmindex expr
2307An implementation of @command{expr} using the Calc package. 2631An implementation of @command{expr} using the Calc package.
2308@xref{Top,,, calc, The GNU Emacs Calculator}. 2632@xref{Top,,, calc, The GNU Emacs Calculator}.
2309 2633
2310@item ff 2634@item ff @var{directory} @var{pattern}
2311@cmindex ff 2635@cmindex ff
2312Shorthand for the the function @code{find-name-dired} (@pxref{Dired 2636Shorthand for the the function @code{find-name-dired} (@pxref{Dired
2313and Find, , , emacs, The Emacs Editor}). 2637and Find, , , emacs, The Emacs Editor}).
2314 2638
2315@item gf 2639@item gf @var{directory} @var{regexp}
2316@cmindex gf 2640@cmindex gf
2317Shorthand for the the function @code{find-grep-dired} (@pxref{Dired 2641Shorthand for the the function @code{find-grep-dired} (@pxref{Dired
2318and Find, , , emacs, The Emacs Editor}). 2642and Find, , , emacs, The Emacs Editor}).
2319 2643
2320@item intersection 2644@item intersection @var{list1} @var{list2} [@var{option}]@dots{}
2321@cmindex intersection 2645@cmindex intersection
2322A wrapper around the function @code{cl-intersection} (@pxref{Lists as 2646A wrapper around the function @code{cl-intersection} (@pxref{Lists as
2323Sets,,, cl, GNU Emacs Common Lisp Emulation}). This command 2647Sets,,, cl, GNU Emacs Common Lisp Emulation}). This command
2324can be used for comparing lists of strings. 2648can be used for comparing lists of strings.
2325 2649
2326@item mismatch 2650@item mismatch @var{seq1} @var{seq2} [@var{option}]@dots{}
2327@cmindex mismatch 2651@cmindex mismatch
2328A wrapper around the function @code{cl-mismatch} (@pxref{Searching 2652A wrapper around the function @code{cl-mismatch} (@pxref{Searching
2329Sequences,,, cl, GNU Emacs Common Lisp Emulation}). This command can 2653Sequences,,, cl, GNU Emacs Common Lisp Emulation}). This command can
2330be used for comparing lists of strings. 2654be used for comparing lists of strings.
2331 2655
2332@item set-difference 2656@item set-difference @var{list1} @var{list2} [@var{option}]@dots{}
2333@cmindex set-difference 2657@cmindex set-difference
2334A wrapper around the function @code{cl-set-difference} (@pxref{Lists 2658A wrapper around the function @code{cl-set-difference} (@pxref{Lists
2335as Sets,,, cl, GNU Emacs Common Lisp Emulation}). This command can be 2659as Sets,,, cl, GNU Emacs Common Lisp Emulation}). This command can be
2336used for comparing lists of strings. 2660used for comparing lists of strings.
2337 2661
2338@item set-exclusive-or 2662@item set-exclusive-or @var{list1} @var{list2} [@var{option}]@dots{}
2339@cmindex set-exclusive-or 2663@cmindex set-exclusive-or
2340A wrapper around the function @code{cl-set-exclusive-or} (@pxref{Lists 2664A wrapper around the function @code{cl-set-exclusive-or} (@pxref{Lists
2341as Sets,,, cl, GNU Emacs Common Lisp Emulation}). This command can be 2665as Sets,,, cl, GNU Emacs Common Lisp Emulation}). This command can be
2342used for comparing lists of strings. 2666used for comparing lists of strings.
2343 2667
2344@item substitute 2668@item substitute @var{new} @var{old} @var{seq} [@var{option}]@dots{}
2345@cmindex substitute 2669@cmindex substitute
2346A wrapper around the function @code{cl-substitute} (@pxref{Sequence 2670A wrapper around the function @code{cl-substitute} (@pxref{Sequence
2347Functions,,, cl, GNU Emacs Common Lisp Emulation}). This command can 2671Functions,,, cl, GNU Emacs Common Lisp Emulation}). This command can
2348be used for comparing lists of strings. 2672be used for comparing lists of strings.
2349 2673
2350@item union 2674@item union @var{list1} @var{list2} [@var{option}]@dots{}
2351@cmindex union 2675@cmindex union
2352A wrapper around the function @code{cl-union} (@pxref{Lists as Sets,,, 2676A wrapper around the function @code{cl-union} (@pxref{Lists as Sets,,,
2353cl, GNU Emacs Common Lisp Emulation}). This command can be used for 2677cl, GNU Emacs Common Lisp Emulation}). This command can be used for
diff --git a/lisp/eshell/em-unix.el b/lisp/eshell/em-unix.el
index 78dfd0654e2..23028576f45 100644
--- a/lisp/eshell/em-unix.el
+++ b/lisp/eshell/em-unix.el
@@ -618,11 +618,11 @@ Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY.")
618 :preserve-args 618 :preserve-args
619 :external "ln" 619 :external "ln"
620 :show-usage 620 :show-usage
621 :usage "[OPTION]... TARGET [LINK_NAME] 621 :usage "[OPTION]... TARGET LINK_NAME
622 or: ln [OPTION]... TARGET... DIRECTORY 622 or: ln [OPTION]... TARGET... DIRECTORY
623Create a link to the specified TARGET with optional LINK_NAME. If there is 623Create a link to the specified TARGET with LINK_NAME. If there is more
624more than one TARGET, the last argument must be a directory; create links 624than one TARGET, the last argument must be a directory; create links in
625in DIRECTORY to each TARGET. Create hard links by default, symbolic links 625DIRECTORY to each TARGET. Create hard links by default, symbolic links
626with `--symbolic'. When creating hard links, each TARGET must exist.") 626with `--symbolic'. When creating hard links, each TARGET must exist.")
627 (let ((no-dereference t)) 627 (let ((no-dereference t))
628 (eshell-mvcpln-template "ln" "linking" 628 (eshell-mvcpln-template "ln" "linking"
diff --git a/lisp/eshell/esh-ext.el b/lisp/eshell/esh-ext.el
index dc2b93e574b..44861c222b8 100644
--- a/lisp/eshell/esh-ext.el
+++ b/lisp/eshell/esh-ext.el
@@ -253,10 +253,10 @@ An external command simply means external to Emacs."
253 "Add a set of paths to PATH." 253 "Add a set of paths to PATH."
254 (eshell-eval-using-options 254 (eshell-eval-using-options
255 "addpath" args 255 "addpath" args
256 '((?b "begin" nil prepend "add path element at beginning") 256 '((?b "begin" nil prepend "add to beginning of $PATH")
257 (?h "help" nil nil "display this usage message") 257 (?h "help" nil nil "display this usage message")
258 :usage "[-b] PATH 258 :usage "[-b] DIR...
259Adds the given PATH to $PATH.") 259Adds the given DIR to $PATH.")
260 (let ((path (eshell-get-path t))) 260 (let ((path (eshell-get-path t)))
261 (if args 261 (if args
262 (progn 262 (progn
diff --git a/lisp/eshell/esh-var.el b/lisp/eshell/esh-var.el
index 537bc4b0641..02b5c785625 100644
--- a/lisp/eshell/esh-var.el
+++ b/lisp/eshell/esh-var.el
@@ -433,7 +433,7 @@ the values of nil for each."
433 (?h "help" nil nil "show this usage screen") 433 (?h "help" nil nil "show this usage screen")
434 :external "env" 434 :external "env"
435 :parse-leading-options-only 435 :parse-leading-options-only
436 :usage "[NAME=VALUE]... [COMMAND [ARG]...]") 436 :usage "[NAME=VALUE]... [COMMAND]...")
437 (if args 437 (if args
438 (or (eshell-parse-local-variables args) 438 (or (eshell-parse-local-variables args)
439 (eshell-named-command (car args) (cdr args))) 439 (eshell-named-command (car args) (cdr args)))