Command Aliases


Mutter allows you to make your own shortcuts for commonly used commands. They are usually used to simplify everyday IRC tasks, such as identifying your nickname - e.g. typing '/id' instead of '/nickserv identify'.  You can manage command aliases from the Settings page by clicking on Aliases under the Text Input section.

 

To add an alias, click on the '+' symbol and enter the alias name (e.g. 'v') into the Alias field that will be used to execute the command, and then enter the command itself (e.g. 'version') into the Command field.  This is the basic form of an alias, but often you will want to include arguments to pass to the command from the alias.

 

Arguments passed to an alias can be referenced in the Command field using variables from $1 to $9.  For example, to create an alias that hugs a specified user you would set the Alias field to 'hug' and the Command field to '/me hugs $1'.  When you type '/hug billy', the $1 argument in the Command field is substituted with the name 'billy'.  You can reference all variables passed to the alias using $0, and use $$ for a $ literal.

 

Other built-in identifiers are:

  • $active to reference the active chat view
  • $channel to reference the channel name
  • $date to reference the current date
  • $me to reference your own nickname
  • $nick to reference the recipient's nickname
  • $time to reference the current time

It is also possible to define your own identifiers using custom properties via the '/set' command.  For example, you can create a $greet identifier to be used in an alias:

 

/set greet hello there, how are you today?

 

Multiple statements can be specified for an alias and are separated using a pipe symbol '|' which must have a space before and after it - use || for a | literal.