1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-12 14:14:48 +02:00

core: add support of quotes in commands /key bind and /key bindctxt

This commit is contained in:
Sébastien Helleu
2023-08-27 14:15:30 +02:00
parent 3ca4f2d3e5
commit 181f4c041d
16 changed files with 204 additions and 35 deletions
+1
View File
@@ -15,6 +15,7 @@ For a list of important changes that require manual actions, please look at rele
New features::
* core: add support of quotes in commands `/key bind` and `/key bindctxt`
* core: evaluate command given to `/repeat` with contextual variables (issue #2007)
* core: add option `callbacks` in command `/debug`
* core: add option type "enum" (issue #1973)
+3 -2
View File
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-08-27 11:25+0200\n"
"POT-Creation-Date: 2023-08-27 14:12+0200\n"
"PO-Revision-Date: 2023-06-26 21:34+0200\n"
"Last-Translator: Ondřej Súkup <mimi.vx@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -2060,7 +2060,8 @@ msgid ""
"context \"default\")\n"
" bindctxt: bind a command to a key or display command bound to key, for "
"given context\n"
" command: command (many commands can be separated by semicolons)\n"
" command: command (many commands can be separated by semicolons); quotes "
"can be used to preserve spaces at the beginning/end of command\n"
" unbind: remove a key binding (for context \"default\")\n"
" unbindctxt: remove a key binding for given context\n"
" reset: reset a key to default binding (for context \"default\")\n"
+72 -2
View File
@@ -26,7 +26,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-08-27 11:25+0200\n"
"POT-Creation-Date: 2023-08-27 14:12+0200\n"
"PO-Revision-Date: 2023-08-27 00:11+0200\n"
"Last-Translator: Nils Görs <weechatter@arcor.de>\n"
"Language-Team: German <kde-i18n-de@kde.org>\n"
@@ -2562,6 +2562,75 @@ msgstr ""
"unbindctxt <context> <key> || reset <key> || resetctxt <context> <key> || "
"resetall -yes [<context>] || missing [<context>] || legacy <key> [<key>...]"
#, fuzzy
#| msgid ""
#| " list: list all current keys\n"
#| "listdefault: list default keys\n"
#| " listdiff: list differences between current and default keys (keys "
#| "added, redefined or deleted)\n"
#| " context: name of context (\"default\" or \"search\")\n"
#| " bind: bind a command to a key or display command bound to key (for "
#| "context \"default\")\n"
#| " bindctxt: bind a command to a key or display command bound to key, for "
#| "given context\n"
#| " command: command (many commands can be separated by semicolons)\n"
#| " unbind: remove a key binding (for context \"default\")\n"
#| " unbindctxt: remove a key binding for given context\n"
#| " reset: reset a key to default binding (for context \"default\")\n"
#| " resetctxt: reset a key to default binding, for given context\n"
#| " resetall: restore bindings to the default values and delete ALL "
#| "personal bindings (use carefully!)\n"
#| " missing: add missing keys (using default bindings), useful after "
#| "installing new WeeChat version\n"
#| " legacy: display new name for legacy keys\n"
#| "\n"
#| "When binding a command to a key, it is recommended to use key alt+k (or "
#| "Esc then k), and then press the key to bind: this will insert key name in "
#| "command line.\n"
#| "\n"
#| "For some keys you might need to use /debug key, this displays the raw key "
#| "code that can be used (for example the key ctrl+backspace could be \"ctrl-"
#| "h\" or \"ctrl-?\", depending on your terminal and other settings).\n"
#| "\n"
#| "Modifiers allowed (in this order when multiple are used):\n"
#| " meta- (alt key)\n"
#| " ctrl- (control key)\n"
#| " shift- (shift key, can only be used with key names below)\n"
#| "\n"
#| "Key names allowed: f0 to f20, home, insert, delete, end, backspace, pgup, "
#| "pgdn, up, down, right, left, tab, return, comma, space.\n"
#| "\n"
#| "Combo of keys must be separated by a comma.\n"
#| "\n"
#| "For context \"mouse\" (possible in context \"cursor\" too), key has "
#| "format: \"@area:key\" or \"@area1>area2:key\" where area can be:\n"
#| " *: any area on screen\n"
#| " chat: chat area (any buffer)\n"
#| " chat(xxx): chat area for buffer with name \"xxx\" (full name including "
#| "plugin)\n"
#| " bar(*): any bar\n"
#| " bar(xxx): bar \"xxx\"\n"
#| " item(*): any bar item\n"
#| " item(xxx): bar item \"xxx\"\n"
#| "Wildcard \"*\" is allowed in key to match many mouse events.\n"
#| "A special value for command with format \"hsignal:name\" can be used for "
#| "context mouse, this will send the hsignal \"name\" with the focus "
#| "hashtable as argument.\n"
#| "Another special value \"-\" can be used to disable key (it will be "
#| "ignored when looking for keys).\n"
#| "\n"
#| "Examples:\n"
#| " key alt-r to jump to #weechat IRC channel:\n"
#| " /key bind meta-r /buffer #weechat\n"
#| " restore default binding for key alt-r:\n"
#| " /key reset meta-r\n"
#| " key meta-v then f1 to run /help:\n"
#| " /key bind meta-v,f1 /help\n"
#| " key \"tab\" to stop search in buffer:\n"
#| " /key bindctxt search tab /input search_stop\n"
#| " middle button of mouse on a nick to retrieve info on nick:\n"
#| " /key bindctxt mouse @item(buffer_nicklist):button3 /msg nickserv info "
#| "${nick}"
msgid ""
" list: list all current keys\n"
"listdefault: list default keys\n"
@@ -2572,7 +2641,8 @@ msgid ""
"context \"default\")\n"
" bindctxt: bind a command to a key or display command bound to key, for "
"given context\n"
" command: command (many commands can be separated by semicolons)\n"
" command: command (many commands can be separated by semicolons); quotes "
"can be used to preserve spaces at the beginning/end of command\n"
" unbind: remove a key binding (for context \"default\")\n"
" unbindctxt: remove a key binding for given context\n"
" reset: reset a key to default binding (for context \"default\")\n"
+3 -2
View File
@@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-08-27 11:25+0200\n"
"POT-Creation-Date: 2023-08-27 14:12+0200\n"
"PO-Revision-Date: 2023-06-26 21:34+0200\n"
"Last-Translator: Santiago Forero <santiago@forero.xyz>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -2560,7 +2560,8 @@ msgid ""
"context \"default\")\n"
" bindctxt: bind a command to a key or display command bound to key, for "
"given context\n"
" command: command (many commands can be separated by semicolons)\n"
" command: command (many commands can be separated by semicolons); quotes "
"can be used to preserve spaces at the beginning/end of command\n"
" unbind: remove a key binding (for context \"default\")\n"
" unbindctxt: remove a key binding for given context\n"
" reset: reset a key to default binding (for context \"default\")\n"
+6 -4
View File
@@ -21,8 +21,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-08-27 11:25+0200\n"
"PO-Revision-Date: 2023-08-27 11:28+0200\n"
"POT-Creation-Date: 2023-08-27 14:12+0200\n"
"PO-Revision-Date: 2023-08-27 14:12+0200\n"
"Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"Language: fr\n"
@@ -2523,7 +2523,8 @@ msgid ""
"context \"default\")\n"
" bindctxt: bind a command to a key or display command bound to key, for "
"given context\n"
" command: command (many commands can be separated by semicolons)\n"
" command: command (many commands can be separated by semicolons); quotes "
"can be used to preserve spaces at the beginning/end of command\n"
" unbind: remove a key binding (for context \"default\")\n"
" unbindctxt: remove a key binding for given context\n"
" reset: reset a key to default binding (for context \"default\")\n"
@@ -2593,7 +2594,8 @@ msgstr ""
" bindctxt : associer une commande à une touche ou affiche la commande "
"associée à la touche pour le contexte donné\n"
" commande : commande (plusieurs commandes peuvent être séparées par des "
"points-virgules)\n"
"points-virgules) ; des guillemets peuvent être utilisés pour préserver les "
"espaces au début et à la fin de la commande\n"
" unbind : supprimer l'association à une touche\n"
" unbindctxt : supprimer l'association à une touche pour le contexte donné\n"
" reset : réinitialiser une touche à son association par défaut\n"
+3 -2
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-08-27 11:25+0200\n"
"POT-Creation-Date: 2023-08-27 14:12+0200\n"
"PO-Revision-Date: 2023-06-17 11:47+0200\n"
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -1883,7 +1883,8 @@ msgid ""
"context \"default\")\n"
" bindctxt: bind a command to a key or display command bound to key, for "
"given context\n"
" command: command (many commands can be separated by semicolons)\n"
" command: command (many commands can be separated by semicolons); quotes "
"can be used to preserve spaces at the beginning/end of command\n"
" unbind: remove a key binding (for context \"default\")\n"
" unbindctxt: remove a key binding for given context\n"
" reset: reset a key to default binding (for context \"default\")\n"
+3 -2
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-08-27 11:25+0200\n"
"POT-Creation-Date: 2023-08-27 14:12+0200\n"
"PO-Revision-Date: 2023-06-26 21:34+0200\n"
"Last-Translator: Esteban I. Ruiz Moreno <exio4.com@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -2147,7 +2147,8 @@ msgid ""
"context \"default\")\n"
" bindctxt: bind a command to a key or display command bound to key, for "
"given context\n"
" command: command (many commands can be separated by semicolons)\n"
" command: command (many commands can be separated by semicolons); quotes "
"can be used to preserve spaces at the beginning/end of command\n"
" unbind: remove a key binding (for context \"default\")\n"
" unbindctxt: remove a key binding for given context\n"
" reset: reset a key to default binding (for context \"default\")\n"
+3 -2
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-08-27 11:25+0200\n"
"POT-Creation-Date: 2023-08-27 14:12+0200\n"
"PO-Revision-Date: 2023-08-08 07:13+0200\n"
"Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n"
"Language-Team: Japanese <https://github.com/l/weechat/tree/master/"
@@ -2529,7 +2529,8 @@ msgid ""
"context \"default\")\n"
" bindctxt: bind a command to a key or display command bound to key, for "
"given context\n"
" command: command (many commands can be separated by semicolons)\n"
" command: command (many commands can be separated by semicolons); quotes "
"can be used to preserve spaces at the beginning/end of command\n"
" unbind: remove a key binding (for context \"default\")\n"
" unbindctxt: remove a key binding for given context\n"
" reset: reset a key to default binding (for context \"default\")\n"
+3 -2
View File
@@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-08-27 11:25+0200\n"
"POT-Creation-Date: 2023-08-27 14:12+0200\n"
"PO-Revision-Date: 2023-08-08 07:13+0200\n"
"Last-Translator: Krzysztof Korościk <soltys@soltys.info>\n"
"Language-Team: Polish <kde-i18n-doc@kde.org>\n"
@@ -2990,7 +2990,8 @@ msgid ""
"context \"default\")\n"
" bindctxt: bind a command to a key or display command bound to key, for "
"given context\n"
" command: command (many commands can be separated by semicolons)\n"
" command: command (many commands can be separated by semicolons); quotes "
"can be used to preserve spaces at the beginning/end of command\n"
" unbind: remove a key binding (for context \"default\")\n"
" unbindctxt: remove a key binding for given context\n"
" reset: reset a key to default binding (for context \"default\")\n"
+3 -2
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-08-27 11:25+0200\n"
"POT-Creation-Date: 2023-08-27 14:12+0200\n"
"PO-Revision-Date: 2023-06-26 21:34+0200\n"
"Last-Translator: Vasco Almeida <vascomalmeida@sapo.pt>\n"
"Language-Team: Portuguese <>\n"
@@ -2521,7 +2521,8 @@ msgid ""
"context \"default\")\n"
" bindctxt: bind a command to a key or display command bound to key, for "
"given context\n"
" command: command (many commands can be separated by semicolons)\n"
" command: command (many commands can be separated by semicolons); quotes "
"can be used to preserve spaces at the beginning/end of command\n"
" unbind: remove a key binding (for context \"default\")\n"
" unbindctxt: remove a key binding for given context\n"
" reset: reset a key to default binding (for context \"default\")\n"
+3 -2
View File
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-08-27 11:25+0200\n"
"POT-Creation-Date: 2023-08-27 14:12+0200\n"
"PO-Revision-Date: 2023-06-26 21:34+0200\n"
"Last-Translator: Érico Nogueira <ericonr@disroot.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -2224,7 +2224,8 @@ msgid ""
"context \"default\")\n"
" bindctxt: bind a command to a key or display command bound to key, for "
"given context\n"
" command: command (many commands can be separated by semicolons)\n"
" command: command (many commands can be separated by semicolons); quotes "
"can be used to preserve spaces at the beginning/end of command\n"
" unbind: remove a key binding (for context \"default\")\n"
" unbindctxt: remove a key binding for given context\n"
" reset: reset a key to default binding (for context \"default\")\n"
+3 -2
View File
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-08-27 11:25+0200\n"
"POT-Creation-Date: 2023-08-27 14:12+0200\n"
"PO-Revision-Date: 2023-06-17 11:47+0200\n"
"Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -1906,7 +1906,8 @@ msgid ""
"context \"default\")\n"
" bindctxt: bind a command to a key or display command bound to key, for "
"given context\n"
" command: command (many commands can be separated by semicolons)\n"
" command: command (many commands can be separated by semicolons); quotes "
"can be used to preserve spaces at the beginning/end of command\n"
" unbind: remove a key binding (for context \"default\")\n"
" unbindctxt: remove a key binding for given context\n"
" reset: reset a key to default binding (for context \"default\")\n"
+72 -2
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-08-27 11:25+0200\n"
"POT-Creation-Date: 2023-08-27 14:12+0200\n"
"PO-Revision-Date: 2023-08-08 07:14+0200\n"
"Last-Translator: Ivan Pešić <ivan.pesic@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -2593,6 +2593,75 @@ msgstr ""
"<контекст> <тастер> || resetall -yes [<контекст>] || missing [<контекст>] || "
"legacy <тастер> [<тастер>...]"
#, fuzzy
#| msgid ""
#| " list: list all current keys\n"
#| "listdefault: list default keys\n"
#| " listdiff: list differences between current and default keys (keys "
#| "added, redefined or deleted)\n"
#| " context: name of context (\"default\" or \"search\")\n"
#| " bind: bind a command to a key or display command bound to key (for "
#| "context \"default\")\n"
#| " bindctxt: bind a command to a key or display command bound to key, for "
#| "given context\n"
#| " command: command (many commands can be separated by semicolons)\n"
#| " unbind: remove a key binding (for context \"default\")\n"
#| " unbindctxt: remove a key binding for given context\n"
#| " reset: reset a key to default binding (for context \"default\")\n"
#| " resetctxt: reset a key to default binding, for given context\n"
#| " resetall: restore bindings to the default values and delete ALL "
#| "personal bindings (use carefully!)\n"
#| " missing: add missing keys (using default bindings), useful after "
#| "installing new WeeChat version\n"
#| " legacy: display new name for legacy keys\n"
#| "\n"
#| "When binding a command to a key, it is recommended to use key alt+k (or "
#| "Esc then k), and then press the key to bind: this will insert key name in "
#| "command line.\n"
#| "\n"
#| "For some keys you might need to use /debug key, this displays the raw key "
#| "code that can be used (for example the key ctrl+backspace could be \"ctrl-"
#| "h\" or \"ctrl-?\", depending on your terminal and other settings).\n"
#| "\n"
#| "Modifiers allowed (in this order when multiple are used):\n"
#| " meta- (alt key)\n"
#| " ctrl- (control key)\n"
#| " shift- (shift key, can only be used with key names below)\n"
#| "\n"
#| "Key names allowed: f0 to f20, home, insert, delete, end, backspace, pgup, "
#| "pgdn, up, down, right, left, tab, return, comma, space.\n"
#| "\n"
#| "Combo of keys must be separated by a comma.\n"
#| "\n"
#| "For context \"mouse\" (possible in context \"cursor\" too), key has "
#| "format: \"@area:key\" or \"@area1>area2:key\" where area can be:\n"
#| " *: any area on screen\n"
#| " chat: chat area (any buffer)\n"
#| " chat(xxx): chat area for buffer with name \"xxx\" (full name including "
#| "plugin)\n"
#| " bar(*): any bar\n"
#| " bar(xxx): bar \"xxx\"\n"
#| " item(*): any bar item\n"
#| " item(xxx): bar item \"xxx\"\n"
#| "Wildcard \"*\" is allowed in key to match many mouse events.\n"
#| "A special value for command with format \"hsignal:name\" can be used for "
#| "context mouse, this will send the hsignal \"name\" with the focus "
#| "hashtable as argument.\n"
#| "Another special value \"-\" can be used to disable key (it will be "
#| "ignored when looking for keys).\n"
#| "\n"
#| "Examples:\n"
#| " key alt-r to jump to #weechat IRC channel:\n"
#| " /key bind meta-r /buffer #weechat\n"
#| " restore default binding for key alt-r:\n"
#| " /key reset meta-r\n"
#| " key meta-v then f1 to run /help:\n"
#| " /key bind meta-v,f1 /help\n"
#| " key \"tab\" to stop search in buffer:\n"
#| " /key bindctxt search tab /input search_stop\n"
#| " middle button of mouse on a nick to retrieve info on nick:\n"
#| " /key bindctxt mouse @item(buffer_nicklist):button3 /msg nickserv info "
#| "${nick}"
msgid ""
" list: list all current keys\n"
"listdefault: list default keys\n"
@@ -2603,7 +2672,8 @@ msgid ""
"context \"default\")\n"
" bindctxt: bind a command to a key or display command bound to key, for "
"given context\n"
" command: command (many commands can be separated by semicolons)\n"
" command: command (many commands can be separated by semicolons); quotes "
"can be used to preserve spaces at the beginning/end of command\n"
" unbind: remove a key binding (for context \"default\")\n"
" unbindctxt: remove a key binding for given context\n"
" reset: reset a key to default binding (for context \"default\")\n"
+3 -2
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-08-27 11:25+0200\n"
"POT-Creation-Date: 2023-08-27 14:12+0200\n"
"PO-Revision-Date: 2023-08-08 07:14+0200\n"
"Last-Translator: Emir SARI <emir_sari@icloud.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -2610,7 +2610,8 @@ msgid ""
"context \"default\")\n"
" bindctxt: bind a command to a key or display command bound to key, for "
"given context\n"
" command: command (many commands can be separated by semicolons)\n"
" command: command (many commands can be separated by semicolons); quotes "
"can be used to preserve spaces at the beginning/end of command\n"
" unbind: remove a key binding (for context \"default\")\n"
" unbindctxt: remove a key binding for given context\n"
" reset: reset a key to default binding (for context \"default\")\n"
+3 -2
View File
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-08-27 11:25+0200\n"
"POT-Creation-Date: 2023-08-27 14:12+0200\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"
@@ -1741,7 +1741,8 @@ msgid ""
"context \"default\")\n"
" bindctxt: bind a command to a key or display command bound to key, for "
"given context\n"
" command: command (many commands can be separated by semicolons)\n"
" command: command (many commands can be separated by semicolons); quotes "
"can be used to preserve spaces at the beginning/end of command\n"
" unbind: remove a key binding (for context \"default\")\n"
" unbindctxt: remove a key binding for given context\n"
" reset: reset a key to default binding (for context \"default\")\n"
+20 -5
View File
@@ -4106,7 +4106,7 @@ COMMAND_CALLBACK(key)
{
struct t_gui_key *ptr_new_key;
int i, old_keys_count, keys_added, context, rc;
char *key_name;
char *key_name, *value;
/* make C compiler happy */
(void) pointer;
@@ -4197,8 +4197,14 @@ COMMAND_CALLBACK(key)
}
gui_key_verbose = 1;
(void) gui_key_bind (NULL, GUI_KEY_CONTEXT_DEFAULT,
argv[2], argv_eol[3], 1);
value = string_remove_quotes (argv_eol[3], "'\"");
(void) gui_key_bind (NULL, /* buffer */
GUI_KEY_CONTEXT_DEFAULT,
argv[2],
(value) ? value : argv_eol[3],
1); /* check_key */
if (value)
free (value);
gui_key_verbose = 0;
return WEECHAT_RC_OK;
@@ -4239,7 +4245,14 @@ COMMAND_CALLBACK(key)
}
gui_key_verbose = 1;
gui_key_bind (NULL, context, argv[3], argv_eol[4], 1);
value = string_remove_quotes (argv_eol[4], "'\"");
gui_key_bind (NULL, /* buffer */
context,
argv[3],
(value) ? value : argv_eol[4],
1); /* check_key */
if (value)
free (value);
gui_key_verbose = 0;
return WEECHAT_RC_OK;
@@ -8667,7 +8680,9 @@ command_init ()
"key (for context \"default\")\n"
" bindctxt: bind a command to a key or display command bound to "
"key, for given context\n"
" command: command (many commands can be separated by semicolons)\n"
" command: command (many commands can be separated by semicolons); "
"quotes can be used to preserve spaces at the beginning/end of "
"command\n"
" unbind: remove a key binding (for context \"default\")\n"
" unbindctxt: remove a key binding for given context\n"
" reset: reset a key to default binding (for context "