diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2023-09-15 08:43:37 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2023-09-15 08:43:37 +0200 |
commit | 85b5bacfe3d7343cb8695b8d7b0467732d8b8d53 (patch) | |
tree | 948c07233f9177ca637cf83967843af55b0a061b /src/plugins/script | |
parent | e62ff286ff4141e276f22b834b09aa72ac509799 (diff) | |
download | weechat-85b5bacfe3d7343cb8695b8d7b0467732d8b8d53.zip |
script: rename parameters up/down/go to -up/-down/-go in command `/script`
Diffstat (limited to 'src/plugins/script')
-rw-r--r-- | src/plugins/script/script-buffer.c | 8 | ||||
-rw-r--r-- | src/plugins/script/script-command.c | 22 |
2 files changed, 15 insertions, 15 deletions
diff --git a/src/plugins/script/script-buffer.c b/src/plugins/script/script-buffer.c index 801f17b6c..daee80445 100644 --- a/src/plugins/script/script-buffer.c +++ b/src/plugins/script/script-buffer.c @@ -1094,8 +1094,8 @@ void script_buffer_set_keys (struct t_hashtable *hashtable) { char *keys[][2] = { - { "up", "up" }, - { "down", "down" }, + { "up", "-up" }, + { "down", "-down" }, { "meta-A", "toggleautoload" }, { "meta-l", "load" }, { "meta-u", "unload" }, @@ -1113,8 +1113,8 @@ script_buffer_set_keys (struct t_hashtable *hashtable) for (i = 0; keys[i][0]; i++) { if (weechat_config_boolean (script_config_look_use_keys) - || (strcmp (keys[i][1], "up") == 0) - || (strcmp (keys[i][1], "down") == 0)) + || (strcmp (keys[i][1], "-up") == 0) + || (strcmp (keys[i][1], "-down") == 0)) { snprintf (str_key, sizeof (str_key), "key_bind_%s", keys[i][0]); snprintf (str_command, sizeof (str_command), "/script %s", keys[i][1]); diff --git a/src/plugins/script/script-command.c b/src/plugins/script/script-command.c index 80a81c293..96ef216f1 100644 --- a/src/plugins/script/script-command.c +++ b/src/plugins/script/script-command.c @@ -202,7 +202,7 @@ script_command_script (const void *pointer, void *data, return WEECHAT_RC_OK; } - if (weechat_strcmp (argv[1], "go") == 0) + if (weechat_strcmp (argv[1], "-go") == 0) { if ((argc > 2) && script_buffer && !script_buffer_detail_script) { @@ -227,7 +227,7 @@ script_command_script (const void *pointer, void *data, return WEECHAT_RC_OK; } - if (weechat_strcmp (argv[1], "up") == 0) + if (weechat_strcmp (argv[1], "-up") == 0) { if (script_buffer) { @@ -261,7 +261,7 @@ script_command_script (const void *pointer, void *data, return WEECHAT_RC_OK; } - if (weechat_strcmp (argv[1], "down") == 0) + if (weechat_strcmp (argv[1], "-down") == 0) { if (script_buffer) { @@ -317,8 +317,8 @@ script_command_init () " || install|remove|installremove|hold [-q] <script> [<script>...]" " || upgrade" " || update" - " || up|down [<number>]" - " || go <line>|end"), + " || -up|-down [<number>]" + " || -go <line>|end"), N_(" list: list loaded scripts (all languages)\n" " -o: send list of loaded scripts to buffer " "(string in English)\n" @@ -348,9 +348,9 @@ script_command_init () " upgrade: upgrade all installed scripts which are obsolete " "(new version available)\n" " update: update local scripts cache\n" - " up: move the selected line up by \"number\" lines\n" - " down: move the selected line down by \"number\" lines\n" - " go: select a line by number, first line number is 0 " + " -up: move the selected line up by \"number\" lines\n" + " -down: move the selected line down by \"number\" lines\n" + " -go: select a line by number, first line number is 0 " "(\"end\" to select the last line)\n" "\n" "Without argument, this command opens a buffer with list of scripts.\n" @@ -427,8 +427,8 @@ script_command_init () " || hold %(script_scripts)|%*" " || update" " || upgrade" - " || up 1|2|3|4|5" - " || down 1|2|3|4|5" - " || go 0|end", + " || -up 1|2|3|4|5" + " || -down 1|2|3|4|5" + " || -go 0|end", &script_command_script, NULL, NULL); } |