In short: use alias aps 'aptitude search $*'
(quotes seem to be important).
The comment at the top of em-alias.el
says the following.
Creating aliases
The user interface is simple: type alias
followed by the command name followed by the definition. Argument references are made using $1
, $2
, etc., or $*
. For example:
alias ll 'ls -l $*'
This will cause the command ll NEWS
to be replaced by ls -l NEWS
. This is then passed back to the command parser for reparsing.{Only the command text specified in the alias definition will be reparsed. Argument references (such as $*
) are handled using variable values, which means that the expansion will not be reparsed, but used directly.}
To delete an alias, specify its name without a definition:
alias ll
Aliases are written to disk immediately after being defined or deleted. The filename in which they are kept is defined by the variable eshell-aliases-file
.