bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#28568: 26.0.60; [eshell] Incompatible change in alias argument handl


From: Eli Zaretskii
Subject: bug#28568: 26.0.60; [eshell] Incompatible change in alias argument handling
Date: Sat, 30 Sep 2017 11:06:06 +0300

> From: Noam Postavsky <npostavs@users.sourceforge.net>
> Date: Fri, 29 Sep 2017 21:45:24 -0400
> Cc: 28568@debbugs.gnu.org
> 
> Here it is, not sure if I've got the texinfo formatting right.  I'm not
> really clear on the difference between @samp{}, @command{}, and @code{}.

Commands typed by the user should be in @kbd.  Here, for example:

>  Aliases are commands that expand to a longer input line.  For example,
>  @command{ll} is a common alias for @code{ls -l}, and would be defined
> -with the command invocation @samp{alias ll ls -l}; with this defined,
> +with the command invocation @samp{alias ll 'ls -l $*'}; with this defined,
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^

@command is the markup for shell commands, @code is for symbols, and
@samp for a sequence ("sample") of text characters.

> +Note that unlike aliases in Bash, arguments must be handled
> +explicitly.  Typically the alias definition would end in @samp{$*} to
> +pass all arguments along.  More selective use of arguments via
> +@samp{$1}, @samp{$2}, etc., is also possible.  For example,
> +@samp{alias mcd 'mkdir $1 && cd $1'} would cause @samp{mcd foo} to
   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^             ^^^^^^^^^^^^^^
These two should use @kbd.

Thanks.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]