fork/fish-shell
git clone https://git.julia.blue/fork/fish-shell
4bb0d956e
master
1# localization: skip(private) 2 3function __fish_theme_for_each 4set -l callback$argv [ 1 ] 5set -l theme_names$argv [ 2 .. ] 6for theme_namein ( 7set -l matching_names( __fish_theme_names $theme_names ) 8if not set -q theme_names[ 1 ] 9echo default 10echo default-rgb 11string match -rv --'^(default|default-rgb)$' $matching_names 12else 13string join --\n $matching_names 14end 15) 16set -l theme_data( __fish_theme_cat $theme_name ) 17set -l color_themes( string split --\n $theme_data | 18string replace -rf --'^\[(dark|light|unknown)\]$' '$1' ) 19if not set -q color_themes[ 1 ] 20set color_themes unknown 21end 22$callback \ 23 --name=$theme_name \ 24 --data=$theme_data \ 25 --color-themes=$color_themes 26end 27end