35 lines
1.3 KiB
Plaintext
35 lines
1.3 KiB
Plaintext
[[command_alias_alias]]
|
|
[command]*`alias`* create an alias for a command::
|
|
|
|
----
|
|
/alias [-completion <completion>] <alias> [<command> [;<command>...]]
|
|
|
|
completion: completion for alias (optional, by default completion is done with target command)
|
|
note: you can use %%command to use completion of an existing command
|
|
alias: name of alias (wildcard "*" is allowed)
|
|
command: command name with arguments (many commands can be separated by semicolons)
|
|
|
|
Without argument, this command lists all defined alias.
|
|
|
|
Note: in command, special variables are replaced:
|
|
$n: argument 'n' (between 1 and 9)
|
|
$-m: arguments from 1 to 'm'
|
|
$n-: arguments from 'n' to last
|
|
$n-m: arguments from 'n' to 'm'
|
|
$*: all arguments
|
|
$~: last argument
|
|
$var: where "var" is a local variable of buffer (see /buffer localvar)
|
|
examples: $nick, $channel, $server, $plugin, $name
|
|
|
|
To remove an alias, use command /unalias.
|
|
|
|
Examples:
|
|
alias /split to split window horizontally:
|
|
/alias split /window splith
|
|
alias /hello to say "hello" on all channels but not on #weechat:
|
|
/alias hello /allchan -exclude=#weechat msg * hello
|
|
alias /forcejoin to send IRC command "forcejoin" with completion of /sajoin:
|
|
/alias -completion %%sajoin forcejoin /quote forcejoin
|
|
----
|
|
|