diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2017-05-18 20:34:25 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2017-05-18 20:34:25 +0200 |
commit | 2eebde035a79eacd8696b79910fd469e635b6f0e (patch) | |
tree | 0558e770ec4e7eb665920c61a30bab2edac3aaf5 /src/plugins/buflist/buflist-command.c | |
parent | 33ccc29a3f0176f46a83387459936f2f8b92d1e4 (diff) | |
download | weechat-2eebde035a79eacd8696b79910fd469e635b6f0e.zip |
buflist: add option "bar" in command /buflist, do not automatically add the bar when buflist is disabled (closes #994)
Diffstat (limited to 'src/plugins/buflist/buflist-command.c')
-rw-r--r-- | src/plugins/buflist/buflist-command.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/plugins/buflist/buflist-command.c b/src/plugins/buflist/buflist-command.c index 8a006a34b..b3256170f 100644 --- a/src/plugins/buflist/buflist-command.c +++ b/src/plugins/buflist/buflist-command.c @@ -45,6 +45,12 @@ buflist_command_buflist (const void *pointer, void *data, if (argc == 1) return WEECHAT_RC_OK; + if (weechat_strcasecmp (argv[1], "bar") == 0) + { + buflist_add_bar (); + return WEECHAT_RC_OK; + } + if (weechat_strcasecmp (argv[1], "refresh") == 0) { buflist_bar_item_update (); @@ -64,8 +70,9 @@ buflist_command_init () weechat_hook_command ( "buflist", N_("bar item with list of buffers"), - "refresh", - N_("refresh: force the refresh of the \"buflist\" bar item\n" + "bar || refresh", + N_("bar: add the \"buflist\" bar\n" + "refresh: force the refresh of the \"buflist\" bar item\n" "\n" "The lines with buffers are displayed using string evaluation " "(see /help eval for the format), with these options:\n" @@ -115,6 +122,6 @@ buflist_command_init () " - ${hotlist}: the raw hotlist\n" " - ${format_lag}: the lag for an IRC server buffer, empty if " "there's no lag (evaluation of option buflist.format.lag)"), - "refresh", + "bar || refresh", &buflist_command_buflist, NULL, NULL); } |