mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-11 22:21:14 -03:00
fish_config theme show: list default scheme first
Webconfig does the same ("Add the current scheme first, then the
default.").
This commit is contained in:
@@ -3,7 +3,15 @@
|
||||
function __fish_theme_for_each
|
||||
set -l callback $argv[1]
|
||||
set -l theme_names $argv[2..]
|
||||
for theme_name in (__fish_theme_names $theme_names)
|
||||
for theme_name in (
|
||||
set -l matching_names (__fish_theme_names $theme_names)
|
||||
if not set -q theme_names[1]
|
||||
echo default
|
||||
string match -v -- default $matching_names
|
||||
else
|
||||
string join -- \n $matching_names
|
||||
end
|
||||
)
|
||||
set -l theme_data (__fish_theme_cat $theme_name)
|
||||
$callback \
|
||||
--name=$theme_name \
|
||||
|
||||
@@ -149,11 +149,11 @@ fish_config theme show ayu-dark ayu-light | string match -r '^.*ayu.*'
|
||||
mkdir $__fish_config_dir/themes
|
||||
touch $__fish_config_dir/themes/custom-from-userconf.theme
|
||||
fish_config theme show | grep -E '[^-]default|base16-default-dark|custom-from-userconf'
|
||||
# CHECK: {{.*}}default{{\x1b\[m}}
|
||||
# CHECK: {{.*}}custom-from-userconf{{\x1b\[m}}
|
||||
# CHECK: {{.*}}base16-default-dark{{\x1b\[m}}
|
||||
# CHECK: {{.*}}default-dark{{\x1b\[m}}
|
||||
# CHECK: {{.*}}default-light{{\x1b\[m}}
|
||||
# CHECK: {{.*}}default{{\x1b\[m}}
|
||||
|
||||
# Override a default theme with different colors.
|
||||
__fish_data_with_file themes/none.theme \
|
||||
|
||||
Reference in New Issue
Block a user