Aliases
For Revolver version 3.0
An alias is an additional short name given to a command so a user can use the new name to refer to the original command. Aliases also support providing parameters to the command being aliased, so users can specify different behaviour for their command as well.
Aliases are created using the bind
command with the -a
flag.
Aliased commands still retain their original command name. The command will be accessible through it's original name and all alias names for the command.
Simple Alias
The following example shows a simple alias, providing an alternate name for the ls
command.
bind -a dir ls
Now the user can use either ls
or dir
to list the children of the current item.
Providing Parameters
Aliases can also supply parameters to pass to the command being aliased, to make using the same parameters less repeatative. The following example shows how to provide parameters to the command being aliased.
bind -a ssf sf -nv
The above command creates an alias ssf
which executes the sf
command passing the -nv
parameter.
Listing Aliases for Commands
You can see the aliases that have been set for a command using the bind
command without any parameters. This will list all commands and the class implementing the command, with aliases following the class name in brackets.
Remove an Alias
An alias can be removed by using the -r
flag with the bind
command. The -a
flag must of course be passed to bind
as well to ensure the command is processed as an alias.
The below example removes the above dir
alias for the ls
command.
bind -a -r dir