From 7702ed56eaa15fa2c35469ef3354380133ec2372 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Sat, 9 Sep 2023 21:20:17 +0200 Subject: [PATCH] trigger: format and translate command line by line (issue #2005) --- src/plugins/trigger/trigger-command.c | 203 +++++++++++++------------- 1 file changed, 103 insertions(+), 100 deletions(-) diff --git a/src/plugins/trigger/trigger-command.c b/src/plugins/trigger/trigger-command.c index 4774ef1b2..4462e27ac 100644 --- a/src/plugins/trigger/trigger-command.c +++ b/src/plugins/trigger/trigger-command.c @@ -1298,106 +1298,109 @@ trigger_command_init () " || restore | [|...]" " || default -yes" " || monitor []"), - N_(" list: list triggers (without argument, this list is displayed)\n" - " -o: send list of triggers enabled to buffer (string in English)\n" - " -ol: send list of triggers enabled to buffer (translated string)\n" - " -i: copy list of triggers enabled in command line (for " - "sending to buffer) (string in English)\n" - " -il: copy list of triggers enabled in command line (for " - "sending to buffer) (translated string)\n" - " listfull: list triggers with detailed info for each trigger\n" - "listdefault: list default triggers\n" - " add: add a trigger\n" - " addoff: add a trigger (disabled)\n" - " addreplace: add or replace an existing trigger\n" - " name: name of trigger\n" - " hook: signal, hsignal, modifier, line, print, command, " - "command_run, timer, config, focus, info, info_hashtable\n" - " arguments: arguments for the hook, depending on hook (separated " - "by semicolons):\n" - " signal: name(s) of signal (required)\n" - " hsignal: name(s) of hsignal (required)\n" - " modifier: name(s) of modifier (required)\n" - " line: buffer type (\"formatted\", \"free\" or \"*\"), " - "list of buffer masks, tags\n" - " print: buffer, tags, message, strip colors\n" - " command: command (required), description, arguments, " - "description of arguments, completion (all arguments except command " - "are evaluated, \"${tg_trigger_name}\" is replaced by the trigger " - "name, see /help eval)\n" - " command_run: command(s) (required)\n" - " timer: interval (required), align on second, max calls\n" - " config: name(s) of option (required)\n" - " focus: name(s) of area (required)\n" - " info: name(s) of info (required)\n" - " info_hashtable: name(s) of info (required)\n" - " conditions: evaluated conditions for the trigger\n" - " regex: one or more regular expressions to replace strings " - "in variables\n" - " command: command to execute (many commands can be separated by " - "\";\")\n" - "return_code: return code in callback (ok (default), ok_eat, error)\n" - "post_action: action to take after execution (none (default), " - "disable, delete)\n" - " addinput: set input with default arguments to create a trigger\n" - " input: set input with the command used to create the trigger\n" - " output: send the command to create the trigger on the buffer\n" - " recreate: same as \"input\", with option \"addreplace\" instead " - "of \"add\"\n" - " set: set an option in a trigger\n" - " option: name of option: name, hook, arguments, conditions, " - "regex, command, return_code\n" - " (for help on option, you can type: /help " - "trigger.trigger..