mirror of
https://github.com/weechat/weechat.git
synced 2026-06-30 06:46:38 +02:00
core: add theme name completion
Add two completion items hooked alongside "layouts_names": - "theme_themes_all": all theme names (built-ins from the registry plus every *.theme file in <weechat_config_dir>/themes/, including backup-*.theme). Used by tab-complete on /theme apply and /theme info. - "theme_themes_user": user theme files only (excludes built-ins and backup-*.theme). Used by tab-complete on /theme save and /theme delete, so users cannot accidentally try to overwrite a built-in name or save a name colliding with the reserved backup prefix. Both callbacks share a small dir_exec_on_files-based helper to filter the themes directory. The /theme command's completion template in core-command.c is updated to reference these new items.
This commit is contained in:
@@ -10112,10 +10112,10 @@ command_init (void)
|
||||
"backup-<timestamp>. This is controlled by the option "
|
||||
"weechat.look.theme_backup.")),
|
||||
"list -backups"
|
||||
" || apply"
|
||||
" || save -full"
|
||||
" || delete"
|
||||
" || info",
|
||||
" || apply %(theme_themes_all)"
|
||||
" || save %(theme_themes_user) -full"
|
||||
" || delete %(theme_themes_user)"
|
||||
" || info %(theme_themes_all)",
|
||||
&command_theme, NULL, NULL);
|
||||
hook_command (
|
||||
NULL, "toggle",
|
||||
|
||||
Reference in New Issue
Block a user