diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2013-07-05 18:22:10 +0200 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2013-07-05 18:22:10 +0200 |
commit | d38d033ce74a88cf4d86a28ed72ba24b63d6806b (patch) | |
tree | e20455a1ec56fe706f4d0c8e7f3a64eb1019f3f4 /src | |
parent | cd71ea03d2b6fa60942909bab1eedad7f5b1e455 (diff) | |
download | weechat-d38d033ce74a88cf4d86a28ed72ba24b63d6806b.zip |
core: add completion "-quit" for command /upgrade
A "-dummy" option has been added too, just to prevent accidental completion with
"-quit" (which is the first option completed).
Thanks to stfn for initial patch.
Diffstat (limited to 'src')
-rw-r--r-- | src/core/wee-command.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/core/wee-command.c b/src/core/wee-command.c index d6f182f46..133646047 100644 --- a/src/core/wee-command.c +++ b/src/core/wee-command.c @@ -5014,6 +5014,9 @@ COMMAND_CALLBACK(upgrade) (void) data; (void) buffer; + if ((argc > 1) && (string_strcasecmp (argv[1], "-dummy") == 0)) + return WEECHAT_RC_OK; + /* * it is forbidden to upgrade while there are some background process * (hook type "process" or "connect") @@ -6624,6 +6627,8 @@ command_init () N_("[<path_to_binary>|-quit]"), N_("path_to_binary: path to WeeChat binary (default is " "current binary)\n" + " -dummy: do nothing (option used to prevent " + "accidental completion with \"-quit\")\n" " -quit: close *ALL* connections, save session " "and quit WeeChat, which makes possible a delayed " "restoration (see below)\n\n" @@ -6655,7 +6660,7 @@ command_init () "same configuration (files *.conf).\n" "It is possible to restore WeeChat session on another " "machine if you copy the content of directory \"~/.weechat\"."), - "%(filename)", + "%(filename)|-dummy|-quit", &command_upgrade, NULL); hook_command (NULL, "uptime", N_("show WeeChat uptime"), |