C.2. $world->alias


$world->alias function: creates an ALIAS

void $world->alias( pattern ,
  substitution ,
  [attributes] );
void $world->alias( number ,
  [pattern ,
  [substitution]] ,
  [attributes] );

Creates a new alias, or edits the alias identified by number. Entered commands will be matched against pattern (a Perl regular expression), and if the pattern matches, the given substitution will be applied. (In a s/pattern/substitution/ structure.)

Be careful that any part of the command can match. To match only the exact string, use something like '^command$'. To match only in the beginning of the line, use '^command'.

Atributes is a reference to a hash defining attributes for the alias. Generally the call works like this:

$world->alias("pattern", "substitution", { attribute1 => value1,
                                           attribute2 => value2, ... })

Possible attributes: