From 034b216eeef2efbf91edafdb60d3e3ee48d72947 Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Sat, 17 Dec 2011 18:32:40 +0100 Subject: [PATCH] alias: add help about syntax %%command for completion of alias in /alias --- doc/de/autogen/user/alias_commands.txt | 41 +++++++++++++------------- doc/en/autogen/user/alias_commands.txt | 1 + doc/fr/autogen/user/alias_commands.txt | 1 + doc/it/autogen/user/alias_commands.txt | 41 +++++++++++++------------- po/cs.po | 4 ++- po/de.po | 6 ++-- po/es.po | 4 ++- po/fr.po | 8 +++-- po/hu.po | 4 ++- po/it.po | 6 ++-- po/pl.po | 4 ++- po/pt_BR.po | 4 ++- po/ru.po | 4 ++- po/weechat.pot | 4 ++- src/plugins/alias/alias.c | 2 ++ 15 files changed, 81 insertions(+), 53 deletions(-) diff --git a/doc/de/autogen/user/alias_commands.txt b/doc/de/autogen/user/alias_commands.txt index 4362f70fc..bc2d3bbb1 100644 --- a/doc/de/autogen/user/alias_commands.txt +++ b/doc/de/autogen/user/alias_commands.txt @@ -3,31 +3,32 @@ ........................................ /alias [-completion ] [ [;...]] -completion: optionale Vervollständigung für einen Alias-Befehl (Standardverhalten: Vervollständigung wird auf den Zielbefehl angewendet) - alias: Name des Alias (kann mit Joker "*" beginnen oder enden um Aliase aufzulisten) - command: Name des zuzuordnenden Befehls (WeeChat- oder IRC-Befehl ohne führenden '/', mehrere Befehle müssen durch Semikolon getrennt werden) +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 (can start or end with "*" for alias listing) + command: command name with arguments (many commands can be separated by semicolons) -Ohne Angabe von Argumenten werden alle definierten Aliase angezeigt. +Without argument, this command lists all defined alias. -Anmerkung: Im Befehl können Variablen genutzt werden, die dann durch den entsprechenden Wert ersetzt werden: - $n: Argument 'n' (zwischen 1 und 9) - $-m: Argumente von 1 bis 'm' - $n-: Argumente von 'n' bis zum letzten Argument - $n-m: Argumente von 'n' bis 'm' - $*: alle Argumente - $~: letztes Argument - $nick: aktueller Nick - $channel: aktueller Channel - $server: aktueller Server +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 + $nick: current nick + $channel: current channel + $server: current server -Um ein Alias zu löschen, nutze "/unalias". +To remove an alias, use command /unalias. -Beispiele: - Alias "/split" wird anlegt um damit ein Fenster horizontal zu teilen: +Examples: + alias /split to split window horizontally: /alias split /window splith - Alias "/hallo" wird angelegt um in allen Channels, außer im #weechat Channel, den Text "Hallo" auszugeben: - /alias hallo /allchan -exclude=#weechat msg * Hallo - Alias "/forcejoin" wird angelegt um den IRC Befehl "forcejoin" mit einer Vervollständigung von /sajoin auszuführen: + 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 ........................................ diff --git a/doc/en/autogen/user/alias_commands.txt b/doc/en/autogen/user/alias_commands.txt index c7ca1d749..9db1ec962 100644 --- a/doc/en/autogen/user/alias_commands.txt +++ b/doc/en/autogen/user/alias_commands.txt @@ -4,6 +4,7 @@ /alias [-completion ] [ [;...]] 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 (can start or end with "*" for alias listing) command: command name with arguments (many commands can be separated by semicolons) diff --git a/doc/fr/autogen/user/alias_commands.txt b/doc/fr/autogen/user/alias_commands.txt index 0a7c73f1a..beb9846d3 100644 --- a/doc/fr/autogen/user/alias_commands.txt +++ b/doc/fr/autogen/user/alias_commands.txt @@ -4,6 +4,7 @@ /alias [-completion ] alias [ [;...]] complétion: complétion pour l'alias (optionnel, par défaut la complétion se fait avec la commande cible) + note: vous pouvez utiliser %%commande pour utiliser la complétion d'une commande existante alias: nom de l'alias (peut démarrer ou se terminer par "*" pour une liste d'alias) commande: nom de la commande avec les paramètres (plusieurs commandes peuvent être séparées par des point-virgules) diff --git a/doc/it/autogen/user/alias_commands.txt b/doc/it/autogen/user/alias_commands.txt index d6593a7ef..c47886e41 100644 --- a/doc/it/autogen/user/alias_commands.txt +++ b/doc/it/autogen/user/alias_commands.txt @@ -3,31 +3,32 @@ ........................................ /alias [-completion ] [ [;...]] -completamento: completamento per l'alias (opzionale, per default il completamento viene eseguito con il comando di destinazione) - alias: nome dell'alias (può iniziare o terminare con "*" per elencare gli alias) - comando: nome del comando (comandi multipli vanno separati da punto e virgola) +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 (can start or end with "*" for alias listing) + command: command name with arguments (many commands can be separated by semicolons) -Senza argomento, questo comando elenca tutti gli alias definiti. +Without argument, this command lists all defined alias. -Nota: nel comando, vengono sostituite le variabili speciali: - $n: argomento 'n' (tra 1 e 9) - $-m: argomenti da 1 a 'm' - $n-: argomenti da 'n' all'ultimo - $n-m: argomenti da 'n' a 'm' - $*: tutti gli argomenti - $~: l'ultimo argomento - $nick: nick corrente - $channel: canale corrente - $server: server corrente +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 + $nick: current nick + $channel: current channel + $server: current server -Per rimuovere un alias, usare il comando /unalias. +To remove an alias, use command /unalias. -Esempi: - alias /split per dividere la finestra orizzontalmente: +Examples: + alias /split to split window horizontally: /alias split /window splith - alias /ciao per dire "ciao" su tutti i canali tranne #weechat: - /alias ciao /allchan -exclude=#weechat msg * ciao - alias /forcejoin per inviare il comando IRC "forcejoin" con il completamento di /sajoin: + 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 ........................................ diff --git a/po/cs.po b/po/cs.po index 9a7403ec3..8b83bb99e 100644 --- a/po/cs.po +++ b/po/cs.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.7-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-12-07 17:39+0100\n" +"POT-Creation-Date: 2011-12-17 18:30+0100\n" "PO-Revision-Date: 2011-11-03 16:57+0100\n" "Last-Translator: Jiri Golembiovsky \n" "Language-Team: weechat-dev \n" @@ -3431,6 +3431,8 @@ msgstr "[-completion ] [ []] msgid "" "completion: completion for alias (optional, by default completion is done " "with target command)\n" +" note: you can use %%command to use completion of an existing " +"command\n" " alias: name of alias (can start or end with \"*\" for alias listing)\n" " command: command name with arguments (many commands can be separated by " "semicolons)\n" diff --git a/po/de.po b/po/de.po index 15d9c9c83..cbbb672ed 100644 --- a/po/de.po +++ b/po/de.po @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.7-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-12-07 17:39+0100\n" +"POT-Creation-Date: 2011-12-17 18:30+0100\n" "PO-Revision-Date: 2011-11-08 22:03+0100\n" "Last-Translator: Nils Görs\n" "Language-Team: weechat-dev \n" @@ -3703,10 +3703,12 @@ msgstr "Einem Befehl wird ein Alias zugewiesen" msgid "[-completion ] [ [;...]]" msgstr "[-completion ] [ [;...]]" -#, c-format +#, fuzzy, c-format msgid "" "completion: completion for alias (optional, by default completion is done " "with target command)\n" +" note: you can use %%command to use completion of an existing " +"command\n" " alias: name of alias (can start or end with \"*\" for alias listing)\n" " command: command name with arguments (many commands can be separated by " "semicolons)\n" diff --git a/po/es.po b/po/es.po index 742cfb99c..ceba7c9d5 100644 --- a/po/es.po +++ b/po/es.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.7-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-12-07 17:39+0100\n" +"POT-Creation-Date: 2011-12-17 18:30+0100\n" "PO-Revision-Date: 2011-11-03 16:57+0100\n" "Last-Translator: Elián Hanisch \n" "Language-Team: weechat-dev \n" @@ -3595,6 +3595,8 @@ msgstr "[-completion ] [ []]" msgid "" "completion: completion for alias (optional, by default completion is done " "with target command)\n" +" note: you can use %%command to use completion of an existing " +"command\n" " alias: name of alias (can start or end with \"*\" for alias listing)\n" " command: command name with arguments (many commands can be separated by " "semicolons)\n" diff --git a/po/fr.po b/po/fr.po index a7996a143..923a830cc 100644 --- a/po/fr.po +++ b/po/fr.po @@ -21,8 +21,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.7-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-12-07 17:39+0100\n" -"PO-Revision-Date: 2011-12-07 17:32+0100\n" +"POT-Creation-Date: 2011-12-17 18:30+0100\n" +"PO-Revision-Date: 2011-12-17 18:30+0100\n" "Last-Translator: Sebastien Helleu \n" "Language-Team: weechat-dev \n" "Language: French\n" @@ -3630,6 +3630,8 @@ msgstr "[-completion ] alias [ [;...]]" msgid "" "completion: completion for alias (optional, by default completion is done " "with target command)\n" +" note: you can use %%command to use completion of an existing " +"command\n" " alias: name of alias (can start or end with \"*\" for alias listing)\n" " command: command name with arguments (many commands can be separated by " "semicolons)\n" @@ -3660,6 +3662,8 @@ msgid "" msgstr "" "complétion: complétion pour l'alias (optionnel, par défaut la complétion se " "fait avec la commande cible)\n" +" note: vous pouvez utiliser %%commande pour utiliser la " +"complétion d'une commande existante\n" " alias: nom de l'alias (peut démarrer ou se terminer par \"*\" pour une " "liste d'alias)\n" " commande: nom de la commande avec les paramètres (plusieurs commandes " diff --git a/po/hu.po b/po/hu.po index b3f30effd..255a61142 100644 --- a/po/hu.po +++ b/po/hu.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.7-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-12-07 17:39+0100\n" +"POT-Creation-Date: 2011-12-17 18:30+0100\n" "PO-Revision-Date: 2011-10-22 12:21+0200\n" "Last-Translator: Andras Voroskoi \n" "Language-Team: weechat-dev \n" @@ -3103,6 +3103,8 @@ msgstr "[alias_név [parancs [paraméterek]]]" msgid "" "completion: completion for alias (optional, by default completion is done " "with target command)\n" +" note: you can use %%command to use completion of an existing " +"command\n" " alias: name of alias (can start or end with \"*\" for alias listing)\n" " command: command name with arguments (many commands can be separated by " "semicolons)\n" diff --git a/po/it.po b/po/it.po index 78d239983..da51532c4 100644 --- a/po/it.po +++ b/po/it.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.7-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-12-07 17:39+0100\n" +"POT-Creation-Date: 2011-12-17 18:30+0100\n" "PO-Revision-Date: 2011-11-15 19:37+0100\n" "Last-Translator: Marco Paolone \n" "Language-Team: weechat-dev \n" @@ -3583,10 +3583,12 @@ msgstr "crea un alias per un comando" msgid "[-completion ] [ [;...]]" msgstr "[-completion ] [ [;...]]" -#, c-format +#, fuzzy, c-format msgid "" "completion: completion for alias (optional, by default completion is done " "with target command)\n" +" note: you can use %%command to use completion of an existing " +"command\n" " alias: name of alias (can start or end with \"*\" for alias listing)\n" " command: command name with arguments (many commands can be separated by " "semicolons)\n" diff --git a/po/pl.po b/po/pl.po index d469920ec..072b94818 100644 --- a/po/pl.po +++ b/po/pl.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.7-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-12-07 17:39+0100\n" +"POT-Creation-Date: 2011-12-17 18:30+0100\n" "PO-Revision-Date: 2011-11-03 16:57+0100\n" "Last-Translator: Krzysztof Korościk \n" "Language-Team: weechat-dev \n" @@ -3578,6 +3578,8 @@ msgstr "[-completion ] [ []]" msgid "" "completion: completion for alias (optional, by default completion is done " "with target command)\n" +" note: you can use %%command to use completion of an existing " +"command\n" " alias: name of alias (can start or end with \"*\" for alias listing)\n" " command: command name with arguments (many commands can be separated by " "semicolons)\n" diff --git a/po/pt_BR.po b/po/pt_BR.po index a082db2a3..6bf191ce7 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.7-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-12-07 17:39+0100\n" +"POT-Creation-Date: 2011-12-17 18:30+0100\n" "PO-Revision-Date: 2011-11-03 16:58+0100\n" "Last-Translator: Ivan Sichmann Freitas \n" "Language-Team: weechat-dev \n" @@ -3521,6 +3521,8 @@ msgstr "" msgid "" "completion: completion for alias (optional, by default completion is done " "with target command)\n" +" note: you can use %%command to use completion of an existing " +"command\n" " alias: name of alias (can start or end with \"*\" for alias listing)\n" " command: command name with arguments (many commands can be separated by " "semicolons)\n" diff --git a/po/ru.po b/po/ru.po index a3ddff8d4..17f78d32b 100644 --- a/po/ru.po +++ b/po/ru.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.7-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-12-07 17:39+0100\n" +"POT-Creation-Date: 2011-12-17 18:30+0100\n" "PO-Revision-Date: 2011-10-22 12:21+0200\n" "Last-Translator: Pavel Shevchuk \n" "Language-Team: weechat-dev \n" @@ -3123,6 +3123,8 @@ msgstr "[сокращение [команда [аргументы]]]" msgid "" "completion: completion for alias (optional, by default completion is done " "with target command)\n" +" note: you can use %%command to use completion of an existing " +"command\n" " alias: name of alias (can start or end with \"*\" for alias listing)\n" " command: command name with arguments (many commands can be separated by " "semicolons)\n" diff --git a/po/weechat.pot b/po/weechat.pot index d7d8a8c1c..a36f9d19d 100644 --- a/po/weechat.pot +++ b/po/weechat.pot @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-12-07 17:39+0100\n" +"POT-Creation-Date: 2011-12-17 18:30+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -2732,6 +2732,8 @@ msgstr "" msgid "" "completion: completion for alias (optional, by default completion is done " "with target command)\n" +" note: you can use %%command to use completion of an existing " +"command\n" " alias: name of alias (can start or end with \"*\" for alias listing)\n" " command: command name with arguments (many commands can be separated by " "semicolons)\n" diff --git a/src/plugins/alias/alias.c b/src/plugins/alias/alias.c index b69d8ca2e..635a833be 100644 --- a/src/plugins/alias/alias.c +++ b/src/plugins/alias/alias.c @@ -975,6 +975,8 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[]) N_("completion: completion for alias (optional, by " "default completion is done with target " "command)\n" + " note: you can use %%command to use " + "completion of an existing command\n" " alias: name of alias (can start or end " "with \"*\" for alias listing)\n" " command: command name with arguments (many "