diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2011-08-16 22:22:42 +0200 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2011-08-16 22:22:42 +0200 |
commit | 168b1dd2b07207ad1771186a48cdebbda9e8527d (patch) | |
tree | eb7d1ba3b9612621d7ef687284f4fbb7ebbc7cb3 /src/core | |
parent | 4d9e8668bb9c4889752b50b20561ab61bea8d12f (diff) | |
download | weechat-168b1dd2b07207ad1771186a48cdebbda9e8527d.zip |
core: allow name of buffer for command /buffer clear (task #11269)
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/wee-command.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/core/wee-command.c b/src/core/wee-command.c index 140df5021..81246bb3c 100644 --- a/src/core/wee-command.c +++ b/src/core/wee-command.c @@ -578,6 +578,12 @@ COMMAND_CALLBACK(buffer) } } } + else + { + ptr_buffer = gui_buffer_search_by_full_name (argv[i]); + if (ptr_buffer) + gui_buffer_clear (ptr_buffer); + } } } } @@ -5308,7 +5314,7 @@ command_init () hook_command (NULL, "buffer", N_("manage buffers"), N_("list" - " || clear [<number>|-merged|-all]" + " || clear [<number>|<name>|-merged|-all]" " || move|merge <number>" " || unmerge [<number>|-all]" " || close [<n1>[-<n2>]|<name>]" @@ -5365,7 +5371,7 @@ command_init () " /buffer #weechat\n" " jump to next buffer:\n" " /buffer +1"), - "clear -merged|-all|%(buffers_numbers)" + "clear -merged|-all|%(buffers_numbers)|%(buffers_plugins_names)" " || move %(buffers_numbers)" " || merge %(buffers_numbers)" " || unmerge %(buffers_numbers)|-all" |