Home
Theory
News
Documentation
Download
Bio
An alias is shorthand for a command. Unlike shell scripts, an alias can include commands that can't be run in a subprocess, like changing directory, or setting or deleting internal data structures like environment variables.

Create alias:

mpsh$ alias name="command etc"

Show existing aliases, formatted for readability, or quoted:

mpsh$ alias -s
mpsh$ alias -q

Delete one alias, or clear all aliases:

mpsh$ alias -d name
mpsh$ alias -c

Any arguments to an alias will be appended to the expanded command. However, if you want to do something more complex with arguments, you can use an alias to invoke a normal or "dot" script, which will get the command's arguments via environment variables:

mpsh$ alias cdnew=". $HOME/mpsh/cdnew"
mpsh$ cat $HOME/mpsh/cdnew
mkdir $1
cd $1
mpsh$ cdnew zardoz