alias - Provides an alias for a command


alias [-h] [<name> [<string>]]

The "alias" command, if given no arguments, will print the definition of all current aliases.

Given a single argument, it will print the definition of that alias (if any). Given two arguments, the keyword <name> becomes an alias for the command string <string>, replacing any other alias with the same name.

Command options:

<name>
Alias
<string>
Command string
It is possible to create aliases that take arguments by using the history substitution mechanism. To protect the history substitution character `%' from immediate expansion, it must be preceded by a `\' when entering the alias.

For example:

NuSMV> alias read "read_model -i \%:1.smv ; set input_order_file \%:1.ord" NuSMV> read short

will create an alias `read', execute "read_model -i short.smv; set input_order_file short.ord".

And again:

NuSMV> alias echo2 "echo Hi ; echo \%* !"
NuSMV> echo2 happy birthday

will print:

Hi
happy birthday !

CAVEAT: Currently there is no check to see if there is a circular dependency in the alias definition. e.g.

NuSMV> alias foo "echo print_bdd_stats; foo"
creates an alias which refers to itself. Executing the command foo will result an infinite loop during which the command print_bdd_stats will be executed.


Last updated on 2012/11/18 14h:16