diff options
30 files changed, 94 insertions, 94 deletions
diff --git a/doc/de/autogen/user/trigger_commands.adoc b/doc/de/autogen/user/trigger_commands.adoc index 8fa9e65d5..244d07f26 100644 --- a/doc/de/autogen/user/trigger_commands.adoc +++ b/doc/de/autogen/user/trigger_commands.adoc @@ -75,7 +75,7 @@ Wenn ein Trigger-Callback aufgerufen wird, dann wird folgende Befehlskette ausge Beispiele (die standardmäßig, eingebauten Trigger kann man sich mit "/trigger listdefault" anzeigen lassen): fügt einer Nachricht die Textattribute *fett*, _unterstrichen_ und /kursiv/ hinzu: - /trigger add effects modifier weechat_print "${tg_tag_nick}" "==\*(\S+)\*==*${color:bold}${re:1}${color:-bold}*== ==_(\S+)_==_${color:underline}${re:1}${color:-underline}_== ==/(\S+)/==/${color:italic}${re:1}${color:-italic}/" + /trigger add effects modifier weechat_print "${tg_tag_nick}" "==\*([^ ]+)\*==*${color:bold}${re:1}${color:-bold}*== ==_([^ ]+)_==_${color:underline}${re:1}${color:-underline}_== ==/([^ ]+)/==/${color:italic}${re:1}${color:-italic}/" verbirgt die Nicklist auf kleineren Terminals: /trigger add resize_small signal signal_sigwinch "${info:term_width} < 100" "" "/bar hide nicklist" /trigger add resize_big signal signal_sigwinch "${info:term_width} >= 100" "" "/bar show nicklist" diff --git a/doc/de/weechat_user.de.adoc b/doc/de/weechat_user.de.adoc index 4a819ce95..533a657e2 100644 --- a/doc/de/weechat_user.de.adoc +++ b/doc/de/weechat_user.de.adoc @@ -3882,7 +3882,7 @@ Matching groups können in "replace" genutzt werden: Beispiel: nutzte Fettschrift zwischen dem Zeichen "*": ---- -/\*(\S+)\*/*${color:bold}${re:1}${color:-bold}*/ +/\*([^ ]+)\*/*${color:bold}${re:1}${color:-bold}*/ ---- Beispiel: der Standard-Trigger _server_pass_ nutzt folgenden regulären Ausdruck @@ -3890,7 +3890,7 @@ um ein Passwort in den Befehlen `/server` und `/connect` zu verbergen (die einzelnen Zeichen des Passwortes werden durch `+*+` ersetzt): ---- -==^(/(server|connect) .*-(sasl_)?password=)(\S+)(.*)==${re:1}${hide:*,${re:4}}${re:5} +==^(/(server|connect) .*-(sasl_)?password=)([^ ]+)(.*)==${re:1}${hide:*,${re:4}}${re:5} ---- [NOTE] @@ -4166,7 +4166,7 @@ Das Hashtable enthält alle Schlüssel/Werte (Typ: string/string). Zeigt URLs in grün an: ---- -/trigger add url_color modifier weechat_print "${tg_notify}" "==\S+://\S+==${color:green}${re:0}${color:reset}==" +/trigger add url_color modifier weechat_print "${tg_notify}" "==[a-zA-Z0-9_]+://[^ ]+==${color:green}${re:0}${color:reset}==" ---- [NOTE] diff --git a/doc/en/autogen/user/trigger_commands.adoc b/doc/en/autogen/user/trigger_commands.adoc index ee161ede8..a9f3d57cf 100644 --- a/doc/en/autogen/user/trigger_commands.adoc +++ b/doc/en/autogen/user/trigger_commands.adoc @@ -75,7 +75,7 @@ When a trigger callback is called, following actions are performed, in this orde Examples (you can also look at default triggers with /trigger listdefault): add text attributes *bold*, _underline_ and /italic/ (only in user messages): - /trigger add effects modifier weechat_print "${tg_tag_nick}" "==\*(\S+)\*==*${color:bold}${re:1}${color:-bold}*== ==_(\S+)_==_${color:underline}${re:1}${color:-underline}_== ==/(\S+)/==/${color:italic}${re:1}${color:-italic}/" + /trigger add effects modifier weechat_print "${tg_tag_nick}" "==\*([^ ]+)\*==*${color:bold}${re:1}${color:-bold}*== ==_([^ ]+)_==_${color:underline}${re:1}${color:-underline}_== ==/([^ ]+)/==/${color:italic}${re:1}${color:-italic}/" hide nicklist bar on small terminals: /trigger add resize_small signal signal_sigwinch "${info:term_width} < 100" "" "/bar hide nicklist" /trigger add resize_big signal signal_sigwinch "${info:term_width} >= 100" "" "/bar show nicklist" diff --git a/doc/en/weechat_plugin_api.en.adoc b/doc/en/weechat_plugin_api.en.adoc index 769b8365a..be5042492 100644 --- a/doc/en/weechat_plugin_api.en.adoc +++ b/doc/en/weechat_plugin_api.en.adoc @@ -2068,12 +2068,12 @@ struct t_hashtable *options2 = weechat_hashtable_new (8, NULL, NULL); /* add brackets around URLs */ -weechat_hashtable_set (options2, "regex", "\\w+://\\S+"); +weechat_hashtable_set (options2, "regex", "[a-zA-Z0-9_]+://[^ ]+"); weechat_hashtable_set (options2, "regex_replace", "[ ${re:0} ]"); char *str4 = weechat_string_eval_expression ("test: https://weechat.org", NULL, NULL, NULL); /* "test: [ https://weechat.org ]" */ /* hide passwords */ -weechat_hashtable_set (options2, "regex", "(password=)(\\S+)"); +weechat_hashtable_set (options2, "regex", "(password=)([^ ]+)"); weechat_hashtable_set (options2, "regex_replace", "${re:1}${hide:*,${re:2}}"); char *str5 = weechat_string_eval_expression ("password=abc password=def", NULL, NULL, NULL); /* "password=*** password=***" */ ---- @@ -2096,14 +2096,14 @@ str3 = weechat.string_eval_expression("${buffer.full_name}", {}, {}, {}) # "core # replace with regex: add brackets around URLs options = { - "regex": "\\w+://\\S+", + "regex": "[a-zA-Z0-9_]+://[^ ]+", "regex_replace": "[ ${re:0} ]", } str4 = weechat.string_eval_expression("test: https://weechat.org", {}, {}, options) # "test: [ https://weechat.org ]" # replace with regex: hide passwords options = { - "regex": "(password=)(\\S+)", + "regex": "(password=)([^ ]+)", "regex_replace": "${re:1}${hide:*,${re:2}}", } str5 = weechat.string_eval_expression("password=abc password=def", {}, {}, options) # "password=*** password=***" diff --git a/doc/en/weechat_user.en.adoc b/doc/en/weechat_user.en.adoc index db79737d9..3f5cb4635 100644 --- a/doc/en/weechat_user.en.adoc +++ b/doc/en/weechat_user.en.adoc @@ -3794,7 +3794,7 @@ Matching groups can be used in "replace": Example: use bold for words between "*": ---- -/\*(\S+)\*/*${color:bold}${re:1}${color:-bold}*/ +/\*([^ ]+)\*/*${color:bold}${re:1}${color:-bold}*/ ---- Example: default trigger _server_pass_ uses this regular expression to hide @@ -3802,7 +3802,7 @@ password in commands `/server` and `/connect` (chars in passwords are replaced by `+*+`): ---- -==^(/(server|connect) .*-(sasl_)?password=)(\S+)(.*)==${re:1}${hide:*,${re:4}}${re:5} +==^(/(server|connect) .*-(sasl_)?password=)([^ ]+)(.*)==${re:1}${hide:*,${re:4}}${re:5} ---- [NOTE] @@ -4076,7 +4076,7 @@ string/string). Display URLs in green: ---- -/trigger add url_color modifier weechat_print "${tg_notify}" "==\S+://\S+==${color:green}${re:0}${color:reset}==" +/trigger add url_color modifier weechat_print "${tg_notify}" "==[a-zA-Z0-9_]+://[^ ]+==${color:green}${re:0}${color:reset}==" ---- [NOTE] diff --git a/doc/fr/autogen/user/trigger_commands.adoc b/doc/fr/autogen/user/trigger_commands.adoc index 63d2967c1..3d1843ffe 100644 --- a/doc/fr/autogen/user/trigger_commands.adoc +++ b/doc/fr/autogen/user/trigger_commands.adoc @@ -75,7 +75,7 @@ Lorsqu'une fonction de rappel de trigger est appelée, les actions suivantes son Exemples (vous pouvez aussi regarder les triggers par défaut avec /trigger listdefault) : ajouter des attributs *gras*, _souligné_ et /italique/ (seulement dans les messages d'utilisateurs) : - /trigger add effects modifier weechat_print "${tg_tag_nick}" "==\*(\S+)\*==*${color:bold}${re:1}${color:-bold}*== ==_(\S+)_==_${color:underline}${re:1}${color:-underline}_== ==/(\S+)/==/${color:italic}${re:1}${color:-italic}/" + /trigger add effects modifier weechat_print "${tg_tag_nick}" "==\*([^ ]+)\*==*${color:bold}${re:1}${color:-bold}*== ==_([^ ]+)_==_${color:underline}${re:1}${color:-underline}_== ==/([^ ]+)/==/${color:italic}${re:1}${color:-italic}/" cacher la barre de pseudos sur les petits terminaux : /trigger add resize_small signal signal_sigwinch "${info:term_width} < 100" "" "/bar hide nicklist" /trigger add resize_big signal signal_sigwinch "${info:term_width} >= 100" "" "/bar show nicklist" diff --git a/doc/fr/weechat_plugin_api.fr.adoc b/doc/fr/weechat_plugin_api.fr.adoc index c8bf8217e..df8b94e23 100644 --- a/doc/fr/weechat_plugin_api.fr.adoc +++ b/doc/fr/weechat_plugin_api.fr.adoc @@ -2112,12 +2112,12 @@ struct t_hashtable *options2 = weechat_hashtable_new (8, NULL, NULL); /* ajout de crochets autour des URLs */ -weechat_hashtable_set (options2, "regex", "\\w+://\\S+"); +weechat_hashtable_set (options2, "regex", "[a-zA-Z0-9_]+://[^ ]+"); weechat_hashtable_set (options2, "regex_replace", "[ ${re:0} ]"); char *str4 = weechat_string_eval_expression ("test : https://weechat.org", NULL, NULL, NULL); /* "test : [ https://weechat.org ]" */ /* masquage des mots de passe */ -weechat_hashtable_set (options2, "regex", "(password=)(\\S+)"); +weechat_hashtable_set (options2, "regex", "(password=)([^ ]+)"); weechat_hashtable_set (options2, "regex_replace", "${re:1}${hide:*,${re:2}}"); char *str5 = weechat_string_eval_expression ("password=abc password=def", NULL, NULL, NULL); /* "password=*** password=***" */ ---- @@ -2140,14 +2140,14 @@ str3 = weechat.string_eval_expression("${buffer.full_name}", {}, {}, {}) # "core # remplacement avec regex : ajout de crochets autour des URLs options = { - "regex": "\\w+://\\S+", + "regex": "[a-zA-Z0-9_]+://[^ ]+", "regex_replace": "[ ${re:0} ]", } str4 = weechat.string_eval_expression("test : https://weechat.org", {}, {}, options) # "test : [ https://weechat.org ]" # replace with regex : masquage des mots de passe options = { - "regex": "(password=)(\\S+)", + "regex": "(password=)([^ ]+)", "regex_replace": "${re:1}${hide:*,${re:2}}", } str5 = weechat.string_eval_expression("password=abc password=def", {}, {}, options) # "password=*** password=***" diff --git a/doc/fr/weechat_user.fr.adoc b/doc/fr/weechat_user.fr.adoc index 5fd6e08e6..40e8803dd 100644 --- a/doc/fr/weechat_user.fr.adoc +++ b/doc/fr/weechat_user.fr.adoc @@ -3917,7 +3917,7 @@ Les groupes de correspondance peuvent être utilisés dans le "remplacement" : Exemple : utiliser du gras pour les mots entre "*" : ---- -/\*(\S+)\*/*${color:bold}${re:1}${color:-bold}*/ +/\*([^ ]+)\*/*${color:bold}${re:1}${color:-bold}*/ ---- Exemple : le trigger par défaut _server_pass_ utilise cette expression régulière @@ -3925,7 +3925,7 @@ pour cacher le mot de passe dans les commandes `/server` et `/connect` (les caractères des mots de passe sont remplacés par `+*+`) : ---- -==^(/(server|connect) .*-(sasl_)?password=)(\S+)(.*)==${re:1}${hide:*,${re:4}}${re:5} +==^(/(server|connect) .*-(sasl_)?password=)([^ ]+)(.*)==${re:1}${hide:*,${re:4}}${re:5} ---- [NOTE] @@ -4215,7 +4215,7 @@ reçue (type : chaîne/chaîne). Afficher les URLs en vert : ---- -/trigger add url_color modifier weechat_print "${tg_notify}" "==\S+://\S+==${color:green}${re:0}${color:reset}==" +/trigger add url_color modifier weechat_print "${tg_notify}" "==[a-zA-Z0-9_]+://[^ ]+==${color:green}${re:0}${color:reset}==" ---- [NOTE] diff --git a/doc/it/autogen/user/trigger_commands.adoc b/doc/it/autogen/user/trigger_commands.adoc index ee161ede8..a9f3d57cf 100644 --- a/doc/it/autogen/user/trigger_commands.adoc +++ b/doc/it/autogen/user/trigger_commands.adoc @@ -75,7 +75,7 @@ When a trigger callback is called, following actions are performed, in this orde Examples (you can also look at default triggers with /trigger listdefault): add text attributes *bold*, _underline_ and /italic/ (only in user messages): - /trigger add effects modifier weechat_print "${tg_tag_nick}" "==\*(\S+)\*==*${color:bold}${re:1}${color:-bold}*== ==_(\S+)_==_${color:underline}${re:1}${color:-underline}_== ==/(\S+)/==/${color:italic}${re:1}${color:-italic}/" + /trigger add effects modifier weechat_print "${tg_tag_nick}" "==\*([^ ]+)\*==*${color:bold}${re:1}${color:-bold}*== ==_([^ ]+)_==_${color:underline}${re:1}${color:-underline}_== ==/([^ ]+)/==/${color:italic}${re:1}${color:-italic}/" hide nicklist bar on small terminals: /trigger add resize_small signal signal_sigwinch "${info:term_width} < 100" "" "/bar hide nicklist" /trigger add resize_big signal signal_sigwinch "${info:term_width} >= 100" "" "/bar show nicklist" diff --git a/doc/it/weechat_plugin_api.it.adoc b/doc/it/weechat_plugin_api.it.adoc index 790e85be7..7482f72d9 100644 --- a/doc/it/weechat_plugin_api.it.adoc +++ b/doc/it/weechat_plugin_api.it.adoc @@ -2159,12 +2159,12 @@ struct t_hashtable *options2 = weechat_hashtable_new (8, NULL, NULL); /* add brackets around URLs */ -weechat_hashtable_set (options2, "regex", "\\w+://\\S+"); +weechat_hashtable_set (options2, "regex", "[a-zA-Z0-9_]+://[^ ]+"); weechat_hashtable_set (options2, "regex_replace", "[ ${re:0} ]"); char *str4 = weechat_string_eval_expression ("test: https://weechat.org", NULL, NULL, NULL); /* "test: [ https://weechat.org ]" */ /* hide passwords */ -weechat_hashtable_set (options2, "regex", "(password=)(\\S+)"); +weechat_hashtable_set (options2, "regex", "(password=)([^ ]+)"); weechat_hashtable_set (options2, "regex_replace", "${re:1}${hide:*,${re:2}}"); char *str5 = weechat_string_eval_expression ("password=abc password=def", NULL, NULL, NULL); /* "password=*** password=***" */ ---- @@ -2187,14 +2187,14 @@ str3 = weechat.string_eval_expression("${buffer.full_name}", {}, {}, {}) # "core # replace with regex: add brackets around URLs options = { - "regex": "\\w+://\\S+", + "regex": "[a-zA-Z0-9_]+://[^ ]+", "regex_replace": "[ ${re:0} ]", } str4 = weechat.string_eval_expression("test: https://weechat.org", {}, {}, options) # "test: [ https://weechat.org ]" # replace with regex: hide passwords options = { - "regex": "(password=)(\\S+)", + "regex": "(password=)([^ ]+)", "regex_replace": "${re:1}${hide:*,${re:2}}", } str5 = weechat.string_eval_expression("password=abc password=def", {}, {}, options) # "password=*** password=***" diff --git a/doc/it/weechat_user.it.adoc b/doc/it/weechat_user.it.adoc index c02e3d740..70c6748fa 100644 --- a/doc/it/weechat_user.it.adoc +++ b/doc/it/weechat_user.it.adoc @@ -4057,7 +4057,7 @@ Matching groups can be used in "replace": Example: use bold for words between "*": ---- -/\*(\S+)\*/*${color:bold}${re:1}${color:-bold}*/ +/\*([^ ]+)\*/*${color:bold}${re:1}${color:-bold}*/ ---- Example: default trigger _server_pass_ uses this regular expression to hide @@ -4065,7 +4065,7 @@ password in commands `/server` and `/connect` (chars in passwords are replaced by `+*+`): ---- -==^(/(server|connect) .*-(sasl_)?password=)(\S+)(.*)==${re:1}${hide:*,${re:4}}${re:5} +==^(/(server|connect) .*-(sasl_)?password=)([^ ]+)(.*)==${re:1}${hide:*,${re:4}}${re:5} ---- [NOTE] @@ -4339,7 +4339,7 @@ string/string). Display URLs in green: ---- -/trigger add url_color modifier weechat_print "${tg_notify}" "==\S+://\S+==${color:green}${re:0}${color:reset}==" +/trigger add url_color modifier weechat_print "${tg_notify}" "==[a-zA-Z0-9_]+://[^ ]+==${color:green}${re:0}${color:reset}==" ---- [NOTE] diff --git a/doc/ja/autogen/user/trigger_commands.adoc b/doc/ja/autogen/user/trigger_commands.adoc index 47c22e96a..1ee632f5c 100644 --- a/doc/ja/autogen/user/trigger_commands.adoc +++ b/doc/ja/autogen/user/trigger_commands.adoc @@ -75,7 +75,7 @@ post_action: トリガ実行後の処遇 (none (デフォルト、何もしな 例 (/trigger listdefault でデフォルトトリガを見ることができます): テキスト属性 *太字*、_下線_、/イタリック/ を追加 (ユーザメッセージのみ): - /trigger add effects modifier weechat_print "${tg_tag_nick}" "==\*(\S+)\*==*${color:bold}${re:1}${color:-bold}*== ==_(\S+)_==_${color:underline}${re:1}${color:-underline}_== ==/(\S+)/==/${color:italic}${re:1}${color:-italic}/" + /trigger add effects modifier weechat_print "${tg_tag_nick}" "==\*([^ ]+)\*==*${color:bold}${re:1}${color:-bold}*== ==_([^ ]+)_==_${color:underline}${re:1}${color:-underline}_== ==/([^ ]+)/==/${color:italic}${re:1}${color:-italic}/" 狭い端末ではニックネームリストバーを隠す: /trigger add resize_small signal signal_sigwinch "${info:term_width} < 100" "" "/bar hide nicklist" /trigger add resize_big signal signal_sigwinch "${info:term_width} >= 100" "" "/bar show nicklist" diff --git a/doc/ja/weechat_plugin_api.ja.adoc b/doc/ja/weechat_plugin_api.ja.adoc index 98a97ad40..7fbc93217 100644 --- a/doc/ja/weechat_plugin_api.ja.adoc +++ b/doc/ja/weechat_plugin_api.ja.adoc @@ -2075,12 +2075,12 @@ struct t_hashtable *options2 = weechat_hashtable_new (8, NULL, NULL); /* URL に関するブラックリストを追加 */ -weechat_hashtable_set (options2, "regex", "\\w+://\\S+"); +weechat_hashtable_set (options2, "regex", "[a-zA-Z0-9_]+://[^ ]+"); weechat_hashtable_set (options2, "regex_replace", "[ ${re:0} ]"); char *str4 = weechat_string_eval_expression ("test: https://weechat.org", NULL, NULL, NULL); /* "test: [ https://weechat.org ]" */ /* パスワードを隠す */ -weechat_hashtable_set (options2, "regex", "(password=)(\\S+)"); +weechat_hashtable_set (options2, "regex", "(password=)([^ ]+)"); weechat_hashtable_set (options2, "regex_replace", "${re:1}${hide:*,${re:2}}"); char *str5 = weechat_string_eval_expression ("password=abc password=def", NULL, NULL, NULL); /* "password=*** password=***" */ ---- @@ -2103,14 +2103,14 @@ str3 = weechat.string_eval_expression("${buffer.full_name}", {}, {}, {}) # "core # 正規表現を用いた置換: URL に関するブラックリストを追加 options = { - "regex": "\\w+://\\S+", + "regex": "[a-zA-Z0-9_]+://[^ ]+", "regex_replace": "[ ${re:0} ]", } str4 = weechat.string_eval_expression("test: https://weechat.org", {}, {}, options) # "test: [ https://weechat.org ]" # 正規表現を用いた置換: パスワードを隠す options = { - "regex": "(password=)(\\S+)", + "regex": "(password=)([^ ]+)", "regex_replace": "${re:1}${hide:*,${re:2}}", } str5 = weechat.string_eval_expression("password=abc password=def", {}, {}, options) # "password=*** password=***" diff --git a/doc/ja/weechat_user.ja.adoc b/doc/ja/weechat_user.ja.adoc index 556b758b7..11cfa276f 100644 --- a/doc/ja/weechat_user.ja.adoc +++ b/doc/ja/weechat_user.ja.adoc @@ -3789,7 +3789,7 @@ WeeChat によって使われる値に影響を及ぼします 例: "*" で囲まれた文字を太字にする: ---- -/\*(\S+)\*/*${color:bold}${re:1}${color:-bold}*/ +/\*([^ ]+)\*/*${color:bold}${re:1}${color:-bold}*/ ---- 例: デフォルトトリガ _server_pass_ はこの正規表現を使って、`/server` @@ -3797,7 +3797,7 @@ WeeChat によって使われる値に影響を及ぼします `*` で置換しています): ---- -==^(/(server|connect) .*-(sasl_)?password=)(\S+)(.*)==${re:1}${hide:*,${re:4}}${re:5} +==^(/(server|connect) .*-(sasl_)?password=)([^ ]+)(.*)==${re:1}${hide:*,${re:4}}${re:5} ---- [NOTE] @@ -4069,7 +4069,7 @@ string/string) が含まれています。 URL を緑色にする: ---- -/trigger add url_color modifier weechat_print "${tg_notify}" "==\S+://\S+==${color:green}${re:0}${color:reset}==" +/trigger add url_color modifier weechat_print "${tg_notify}" "==[a-zA-Z0-9_]+://[^ ]+==${color:green}${re:0}${color:reset}==" ---- [NOTE] diff --git a/doc/pl/autogen/user/trigger_commands.adoc b/doc/pl/autogen/user/trigger_commands.adoc index f3a075ca2..4a52cfb45 100644 --- a/doc/pl/autogen/user/trigger_commands.adoc +++ b/doc/pl/autogen/user/trigger_commands.adoc @@ -75,7 +75,7 @@ Kiedy callback triggera jest wywoływany, wykonywane są następujące akcje, w Przykłady (możesz też spojrzeć na domyślne triggery za pomocą /trigger listdefault): dodaje atrybuty tekstu *bold*, _underline_ i /italic/ (tylko w wiadomościach użytkowników): - /trigger add effects modifier weechat_print "${tg_tag_nick}" "==\*(\S+)\*==*${color:bold}${re:1}${color:-bold}*== ==_(\S+)_==_${color:underline}${re:1}${color:-underline}_== ==/(\S+)/==/${color:italic}${re:1}${color:-italic}/" + /trigger add effects modifier weechat_print "${tg_tag_nick}" "==\*([^ ]+)\*==*${color:bold}${re:1}${color:-bold}*== ==_([^ ]+)_==_${color:underline}${re:1}${color:-underline}_== ==/([^ ]+)/==/${color:italic}${re:1}${color:-italic}/" ukrywa pasek z nickami na małych terminalach: /trigger add resize_small signal signal_sigwinch "${info:term_width} < 100" "" "/bar hide nicklist" /trigger add resize_big signal signal_sigwinch "${info:term_width} >= 100" "" "/bar show nicklist" diff --git a/doc/pl/weechat_user.pl.adoc b/doc/pl/weechat_user.pl.adoc index 7f0059461..33f7abf19 100644 --- a/doc/pl/weechat_user.pl.adoc +++ b/doc/pl/weechat_user.pl.adoc @@ -3824,14 +3824,14 @@ Dopasowane grupy, które mogą zostać użyte w "zamień": Przykład: użyj pogrubienia dla słów pomiędzy "*": ---- -/\*(\S+)\*/*${color:bold}${re:1}${color:-bold}*/ +/\*([^ ]+)\*/*${color:bold}${re:1}${color:-bold}*/ ---- Przykład: domyślny trigger _server_pass_ używa tego wyrażenia do ukrycia hasła w komendach `/server` i `/connect` (znaki haseł są zastępowane przez `+*+`): ---- -==^(/(server|connect) .*-(sasl_)?password=)(\S+)(.*)==${re:1}${hide:*,${re:4}}${re:5} +==^(/(server|connect) .*-(sasl_)?password=)([^ ]+)(.*)==${re:1}${hide:*,${re:4}}${re:5} ---- [NOTE] @@ -4104,7 +4104,7 @@ ciąg/ciąg). Wyświetlanie URLi na zielono: ---- -/trigger add url_color modifier weechat_print "${tg_notify}" "==\S+://\S+==${color:green}${re:0}${color:reset}==" +/trigger add url_color modifier weechat_print "${tg_notify}" "==[a-zA-Z0-9_]+://[^ ]+==${color:green}${re:0}${color:reset}==" ---- [NOTE] @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2019-01-20 18:39+0100\n" +"POT-Creation-Date: 2019-01-26 09:58+0100\n" "PO-Revision-Date: 2018-11-17 10:36+0100\n" "Last-Translator: Ondřej Súkup <mimi.vx@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -12069,8 +12069,8 @@ msgid "" " add text attributes *bold*, _underline_ and /italic/ (only in user " "messages):\n" " /trigger add effects modifier weechat_print \"${tg_tag_nick}\" \"==" -"\\*(\\S+)\\*==*${color:bold}${re:1}${color:-bold}*== ==_(\\S+)_==_${color:" -"underline}${re:1}${color:-underline}_== ==/(\\S+)/==/${color:" +"\\*([^ ]+)\\*==*${color:bold}${re:1}${color:-bold}*== ==_([^ ]+)_==_${color:" +"underline}${re:1}${color:-underline}_== ==/([^ ]+)/==/${color:" "italic}${re:1}${color:-italic}/\"\n" " hide nicklist bar on small terminals:\n" " /trigger add resize_small signal signal_sigwinch \"${info:term_width} < " @@ -24,8 +24,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2019-01-20 18:39+0100\n" -"PO-Revision-Date: 2019-01-20 18:42+0100\n" +"POT-Creation-Date: 2019-01-26 09:58+0100\n" +"PO-Revision-Date: 2019-01-26 10:05+0100\n" "Last-Translator: Nils Görs <weechatter@arcor.de>\n" "Language-Team: German <kde-i18n-de@kde.org>\n" "Language: de\n" @@ -14067,8 +14067,8 @@ msgid "" " add text attributes *bold*, _underline_ and /italic/ (only in user " "messages):\n" " /trigger add effects modifier weechat_print \"${tg_tag_nick}\" \"==" -"\\*(\\S+)\\*==*${color:bold}${re:1}${color:-bold}*== ==_(\\S+)_==_${color:" -"underline}${re:1}${color:-underline}_== ==/(\\S+)/==/${color:" +"\\*([^ ]+)\\*==*${color:bold}${re:1}${color:-bold}*== ==_([^ ]+)_==_${color:" +"underline}${re:1}${color:-underline}_== ==/([^ ]+)/==/${color:" "italic}${re:1}${color:-italic}/\"\n" " hide nicklist bar on small terminals:\n" " /trigger add resize_small signal signal_sigwinch \"${info:term_width} < " @@ -14166,8 +14166,8 @@ msgstr "" " fügt einer Nachricht die Textattribute *fett*, _unterstrichen_ und /" "kursiv/ hinzu:\n" " /trigger add effects modifier weechat_print \"${tg_tag_nick}\" \"==" -"\\*(\\S+)\\*==*${color:bold}${re:1}${color:-bold}*== ==_(\\S+)_==_${color:" -"underline}${re:1}${color:-underline}_== ==/(\\S+)/==/${color:" +"\\*([^ ]+)\\*==*${color:bold}${re:1}${color:-bold}*== ==_([^ ]+)_==_${color:" +"underline}${re:1}${color:-underline}_== ==/([^ ]+)/==/${color:" "italic}${re:1}${color:-italic}/\"\n" " verbirgt die Nicklist auf kleineren Terminals:\n" " /trigger add resize_small signal signal_sigwinch \"${info:term_width} < " @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2019-01-20 18:39+0100\n" +"POT-Creation-Date: 2019-01-26 09:58+0100\n" "PO-Revision-Date: 2018-11-17 10:36+0100\n" "Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -12349,8 +12349,8 @@ msgid "" " add text attributes *bold*, _underline_ and /italic/ (only in user " "messages):\n" " /trigger add effects modifier weechat_print \"${tg_tag_nick}\" \"==" -"\\*(\\S+)\\*==*${color:bold}${re:1}${color:-bold}*== ==_(\\S+)_==_${color:" -"underline}${re:1}${color:-underline}_== ==/(\\S+)/==/${color:" +"\\*([^ ]+)\\*==*${color:bold}${re:1}${color:-bold}*== ==_([^ ]+)_==_${color:" +"underline}${re:1}${color:-underline}_== ==/([^ ]+)/==/${color:" "italic}${re:1}${color:-italic}/\"\n" " hide nicklist bar on small terminals:\n" " /trigger add resize_small signal signal_sigwinch \"${info:term_width} < " @@ -21,8 +21,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2019-01-20 18:39+0100\n" -"PO-Revision-Date: 2019-01-20 18:41+0100\n" +"POT-Creation-Date: 2019-01-26 09:58+0100\n" +"PO-Revision-Date: 2019-01-26 10:05+0100\n" "Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language: fr\n" @@ -13764,8 +13764,8 @@ msgid "" " add text attributes *bold*, _underline_ and /italic/ (only in user " "messages):\n" " /trigger add effects modifier weechat_print \"${tg_tag_nick}\" \"==" -"\\*(\\S+)\\*==*${color:bold}${re:1}${color:-bold}*== ==_(\\S+)_==_${color:" -"underline}${re:1}${color:-underline}_== ==/(\\S+)/==/${color:" +"\\*([^ ]+)\\*==*${color:bold}${re:1}${color:-bold}*== ==_([^ ]+)_==_${color:" +"underline}${re:1}${color:-underline}_== ==/([^ ]+)/==/${color:" "italic}${re:1}${color:-italic}/\"\n" " hide nicklist bar on small terminals:\n" " /trigger add resize_small signal signal_sigwinch \"${info:term_width} < " @@ -13863,8 +13863,8 @@ msgstr "" " ajouter des attributs *gras*, _souligné_ et /italique/ (seulement dans les " "messages d'utilisateurs) :\n" " /trigger add effects modifier weechat_print \"${tg_tag_nick}\" \"==" -"\\*(\\S+)\\*==*${color:bold}${re:1}${color:-bold}*== ==_(\\S+)_==_${color:" -"underline}${re:1}${color:-underline}_== ==/(\\S+)/==/${color:" +"\\*([^ ]+)\\*==*${color:bold}${re:1}${color:-bold}*== ==_([^ ]+)_==_${color:" +"underline}${re:1}${color:-underline}_== ==/([^ ]+)/==/${color:" "italic}${re:1}${color:-italic}/\"\n" " cacher la barre de pseudos sur les petits terminaux :\n" " /trigger add resize_small signal signal_sigwinch \"${info:term_width} < " @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2019-01-20 18:39+0100\n" +"POT-Creation-Date: 2019-01-26 09:58+0100\n" "PO-Revision-Date: 2018-11-17 10:36+0100\n" "Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -11343,8 +11343,8 @@ msgid "" " add text attributes *bold*, _underline_ and /italic/ (only in user " "messages):\n" " /trigger add effects modifier weechat_print \"${tg_tag_nick}\" \"==" -"\\*(\\S+)\\*==*${color:bold}${re:1}${color:-bold}*== ==_(\\S+)_==_${color:" -"underline}${re:1}${color:-underline}_== ==/(\\S+)/==/${color:" +"\\*([^ ]+)\\*==*${color:bold}${re:1}${color:-bold}*== ==_([^ ]+)_==_${color:" +"underline}${re:1}${color:-underline}_== ==/([^ ]+)/==/${color:" "italic}${re:1}${color:-italic}/\"\n" " hide nicklist bar on small terminals:\n" " /trigger add resize_small signal signal_sigwinch \"${info:term_width} < " @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2019-01-20 18:39+0100\n" +"POT-Creation-Date: 2019-01-26 09:58+0100\n" "PO-Revision-Date: 2018-11-17 10:36+0100\n" "Last-Translator: Esteban I. Ruiz Moreno <exio4.com@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -12571,8 +12571,8 @@ msgid "" " add text attributes *bold*, _underline_ and /italic/ (only in user " "messages):\n" " /trigger add effects modifier weechat_print \"${tg_tag_nick}\" \"==" -"\\*(\\S+)\\*==*${color:bold}${re:1}${color:-bold}*== ==_(\\S+)_==_${color:" -"underline}${re:1}${color:-underline}_== ==/(\\S+)/==/${color:" +"\\*([^ ]+)\\*==*${color:bold}${re:1}${color:-bold}*== ==_([^ ]+)_==_${color:" +"underline}${re:1}${color:-underline}_== ==/([^ ]+)/==/${color:" "italic}${re:1}${color:-italic}/\"\n" " hide nicklist bar on small terminals:\n" " /trigger add resize_small signal signal_sigwinch \"${info:term_width} < " @@ -20,8 +20,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2019-01-20 18:39+0100\n" -"PO-Revision-Date: 2019-01-20 18:43+0100\n" +"POT-Creation-Date: 2019-01-26 09:58+0100\n" +"PO-Revision-Date: 2019-01-26 10:06+0100\n" "Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n" "Language-Team: Japanese <https://github.com/l/weechat/tree/master/" "translation/ja_JP>\n" @@ -13268,8 +13268,8 @@ msgid "" " add text attributes *bold*, _underline_ and /italic/ (only in user " "messages):\n" " /trigger add effects modifier weechat_print \"${tg_tag_nick}\" \"==" -"\\*(\\S+)\\*==*${color:bold}${re:1}${color:-bold}*== ==_(\\S+)_==_${color:" -"underline}${re:1}${color:-underline}_== ==/(\\S+)/==/${color:" +"\\*([^ ]+)\\*==*${color:bold}${re:1}${color:-bold}*== ==_([^ ]+)_==_${color:" +"underline}${re:1}${color:-underline}_== ==/([^ ]+)/==/${color:" "italic}${re:1}${color:-italic}/\"\n" " hide nicklist bar on small terminals:\n" " /trigger add resize_small signal signal_sigwinch \"${info:term_width} < " @@ -13350,8 +13350,8 @@ msgstr "" "例 (/trigger listdefault でデフォルトトリガを見ることができます):\n" " テキスト属性 *太字*、_下線_、/イタリック/ を追加 (ユーザメッセージのみ):\n" " /trigger add effects modifier weechat_print \"${tg_tag_nick}\" \"==" -"\\*(\\S+)\\*==*${color:bold}${re:1}${color:-bold}*== ==_(\\S+)_==_${color:" -"underline}${re:1}${color:-underline}_== ==/(\\S+)/==/${color:" +"\\*([^ ]+)\\*==*${color:bold}${re:1}${color:-bold}*== ==_([^ ]+)_==_${color:" +"underline}${re:1}${color:-underline}_== ==/([^ ]+)/==/${color:" "italic}${re:1}${color:-italic}/\"\n" " 狭い端末ではニックネームリストバーを隠す:\n" " /trigger add resize_small signal signal_sigwinch \"${info:term_width} < " @@ -22,8 +22,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2019-01-20 18:39+0100\n" -"PO-Revision-Date: 2019-01-20 18:44+0100\n" +"POT-Creation-Date: 2019-01-26 09:58+0100\n" +"PO-Revision-Date: 2019-01-26 10:06+0100\n" "Last-Translator: Krzysztof Korościk <soltys@soltys.info>\n" "Language-Team: Polish <kde-i18n-doc@kde.org>\n" "Language: pl\n" @@ -13442,8 +13442,8 @@ msgid "" " add text attributes *bold*, _underline_ and /italic/ (only in user " "messages):\n" " /trigger add effects modifier weechat_print \"${tg_tag_nick}\" \"==" -"\\*(\\S+)\\*==*${color:bold}${re:1}${color:-bold}*== ==_(\\S+)_==_${color:" -"underline}${re:1}${color:-underline}_== ==/(\\S+)/==/${color:" +"\\*([^ ]+)\\*==*${color:bold}${re:1}${color:-bold}*== ==_([^ ]+)_==_${color:" +"underline}${re:1}${color:-underline}_== ==/([^ ]+)/==/${color:" "italic}${re:1}${color:-italic}/\"\n" " hide nicklist bar on small terminals:\n" " /trigger add resize_small signal signal_sigwinch \"${info:term_width} < " @@ -13533,8 +13533,8 @@ msgstr "" " dodaje atrybuty tekstu *bold*, _underline_ i /italic/ (tylko w " "wiadomościach użytkowników):\n" " /trigger add effects modifier weechat_print \"${tg_tag_nick}\" \"==" -"\\*(\\S+)\\*==*${color:bold}${re:1}${color:-bold}*== ==_(\\S+)_==_${color:" -"underline}${re:1}${color:-underline}_== ==/(\\S+)/==/${color:" +"\\*([^ ]+)\\*==*${color:bold}${re:1}${color:-bold}*== ==_([^ ]+)_==_${color:" +"underline}${re:1}${color:-underline}_== ==/([^ ]+)/==/${color:" "italic}${re:1}${color:-italic}/\"\n" " ukrywa pasek z nickami na małych terminalach:\n" " /trigger add resize_small signal signal_sigwinch \"${info:term_width} < " @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2019-01-20 18:39+0100\n" +"POT-Creation-Date: 2019-01-26 09:58+0100\n" "PO-Revision-Date: 2019-01-20 18:45+0100\n" "Last-Translator: Vasco Almeida <vascomalmeida@sapo.pt>\n" "Language-Team: Portuguese <>\n" @@ -13132,8 +13132,8 @@ msgid "" " add text attributes *bold*, _underline_ and /italic/ (only in user " "messages):\n" " /trigger add effects modifier weechat_print \"${tg_tag_nick}\" \"==" -"\\*(\\S+)\\*==*${color:bold}${re:1}${color:-bold}*== ==_(\\S+)_==_${color:" -"underline}${re:1}${color:-underline}_== ==/(\\S+)/==/${color:" +"\\*([^ ]+)\\*==*${color:bold}${re:1}${color:-bold}*== ==_([^ ]+)_==_${color:" +"underline}${re:1}${color:-underline}_== ==/([^ ]+)/==/${color:" "italic}${re:1}${color:-italic}/\"\n" " hide nicklist bar on small terminals:\n" " /trigger add resize_small signal signal_sigwinch \"${info:term_width} < " diff --git a/po/pt_BR.po b/po/pt_BR.po index 0441c4181..08d4fcdef 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2019-01-20 18:39+0100\n" +"POT-Creation-Date: 2019-01-26 09:58+0100\n" "PO-Revision-Date: 2018-11-17 10:36+0100\n" "Last-Translator: Eduardo Elias <camponez@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -11814,8 +11814,8 @@ msgid "" " add text attributes *bold*, _underline_ and /italic/ (only in user " "messages):\n" " /trigger add effects modifier weechat_print \"${tg_tag_nick}\" \"==" -"\\*(\\S+)\\*==*${color:bold}${re:1}${color:-bold}*== ==_(\\S+)_==_${color:" -"underline}${re:1}${color:-underline}_== ==/(\\S+)/==/${color:" +"\\*([^ ]+)\\*==*${color:bold}${re:1}${color:-bold}*== ==_([^ ]+)_==_${color:" +"underline}${re:1}${color:-underline}_== ==/([^ ]+)/==/${color:" "italic}${re:1}${color:-italic}/\"\n" " hide nicklist bar on small terminals:\n" " /trigger add resize_small signal signal_sigwinch \"${info:term_width} < " @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2019-01-20 18:39+0100\n" +"POT-Creation-Date: 2019-01-26 09:58+0100\n" "PO-Revision-Date: 2018-11-17 10:36+0100\n" "Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -11378,8 +11378,8 @@ msgid "" " add text attributes *bold*, _underline_ and /italic/ (only in user " "messages):\n" " /trigger add effects modifier weechat_print \"${tg_tag_nick}\" \"==" -"\\*(\\S+)\\*==*${color:bold}${re:1}${color:-bold}*== ==_(\\S+)_==_${color:" -"underline}${re:1}${color:-underline}_== ==/(\\S+)/==/${color:" +"\\*([^ ]+)\\*==*${color:bold}${re:1}${color:-bold}*== ==_([^ ]+)_==_${color:" +"underline}${re:1}${color:-underline}_== ==/([^ ]+)/==/${color:" "italic}${re:1}${color:-italic}/\"\n" " hide nicklist bar on small terminals:\n" " /trigger add resize_small signal signal_sigwinch \"${info:term_width} < " @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2019-01-20 18:39+0100\n" +"POT-Creation-Date: 2019-01-26 09:58+0100\n" "PO-Revision-Date: 2018-11-17 10:36+0100\n" "Last-Translator: Hasan Kiran <sunder67@hotmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -10382,8 +10382,8 @@ msgid "" " add text attributes *bold*, _underline_ and /italic/ (only in user " "messages):\n" " /trigger add effects modifier weechat_print \"${tg_tag_nick}\" \"==" -"\\*(\\S+)\\*==*${color:bold}${re:1}${color:-bold}*== ==_(\\S+)_==_${color:" -"underline}${re:1}${color:-underline}_== ==/(\\S+)/==/${color:" +"\\*([^ ]+)\\*==*${color:bold}${re:1}${color:-bold}*== ==_([^ ]+)_==_${color:" +"underline}${re:1}${color:-underline}_== ==/([^ ]+)/==/${color:" "italic}${re:1}${color:-italic}/\"\n" " hide nicklist bar on small terminals:\n" " /trigger add resize_small signal signal_sigwinch \"${info:term_width} < " diff --git a/po/weechat.pot b/po/weechat.pot index f6f1ad5a3..f19e8fba4 100644 --- a/po/weechat.pot +++ b/po/weechat.pot @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2019-01-20 18:39+0100\n" +"POT-Creation-Date: 2019-01-26 09:58+0100\n" "PO-Revision-Date: 2014-08-16 10:27+0200\n" "Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -10234,8 +10234,8 @@ msgid "" " add text attributes *bold*, _underline_ and /italic/ (only in user " "messages):\n" " /trigger add effects modifier weechat_print \"${tg_tag_nick}\" \"==" -"\\*(\\S+)\\*==*${color:bold}${re:1}${color:-bold}*== ==_(\\S+)_==_${color:" -"underline}${re:1}${color:-underline}_== ==/(\\S+)/==/${color:" +"\\*([^ ]+)\\*==*${color:bold}${re:1}${color:-bold}*== ==_([^ ]+)_==_${color:" +"underline}${re:1}${color:-underline}_== ==/([^ ]+)/==/${color:" "italic}${re:1}${color:-italic}/\"\n" " hide nicklist bar on small terminals:\n" " /trigger add resize_small signal signal_sigwinch \"${info:term_width} < " diff --git a/src/plugins/trigger/trigger-command.c b/src/plugins/trigger/trigger-command.c index 8bf4c9b57..9601c0297 100644 --- a/src/plugins/trigger/trigger-command.c +++ b/src/plugins/trigger/trigger-command.c @@ -1222,9 +1222,9 @@ trigger_command_init () " add text attributes *bold*, _underline_ and /italic/ (only in " "user messages):\n" " /trigger add effects modifier weechat_print \"${tg_tag_nick}\" " - "\"==\\*(\\S+)\\*==*${color:bold}${re:1}${color:-bold}*== " - "==_(\\S+)_==_${color:underline}${re:1}${color:-underline}_== " - "==/(\\S+)/==/${color:italic}${re:1}${color:-italic}/\"\n" + "\"==\\*([^ ]+)\\*==*${color:bold}${re:1}${color:-bold}*== " + "==_([^ ]+)_==_${color:underline}${re:1}${color:-underline}_== " + "==/([^ ]+)/==/${color:italic}${re:1}${color:-italic}/\"\n" " hide nicklist bar on small terminals:\n" " /trigger add resize_small signal signal_sigwinch " "\"${info:term_width} < 100\" \"\" \"/bar hide nicklist\"\n" |