fish_config theme dump: check for extra arguments

This commit is contained in:
Johannes Altmanninger
2025-12-09 19:39:49 +01:00
parent baaf06b2c6
commit 0e9ceb154e
2 changed files with 7 additions and 0 deletions

View File

@@ -318,6 +318,10 @@ fish_pager_color_secondary_description
return 0
case dump
if set -q argv[1]
echo "Too many arguments" >&2
return 1
end
# Write the current theme in .theme format, to stdout.
set -L | string match -r $theme_var_filter
case '*'

View File

@@ -205,3 +205,6 @@ echo >$__fish_config_dir/themes/custom-from-userconf.theme \
# CHECK: $fish_color_normal: set in universal scope, unexported, with 1 elements
# CHECK: $fish_color_normal[1]: |normal|
}
fish_config theme dump badarg
# CHECKERR: Too many arguments