Do not overwrite fish_colors when updating current prompt. Fix #248.

This commit is contained in:
Jorge Bucaran 2016-05-02 01:43:30 +09:00
parent ad6110ac66
commit 6108ad452b
No known key found for this signature in database
GPG key ID: E54BA3C0E646DB30

View file

@ -675,7 +675,10 @@ function __fisher_plugin_enable -a path
builtin source "$target"
if test "$base" = "set_color_custom.fish"
__fisher_print_default_fish_colors > "$fish_config/fish_colors"
if test ! -s "$fish_config/fish_colors"
__fisher_print_fish_colors > "$fish_config/fish_colors"
end
set_color_custom
end
end
@ -1468,7 +1471,7 @@ function __fisher_plugin_is_installed -a name
end
function __fisher_print_default_fish_colors
function __fisher_print_fish_colors
printf "%s\n" "$fish_color_normal" "$fish_color_command" "$fish_color_param" "$fish_color_redirection" "$fish_color_comment" "$fish_color_error" "$fish_color_escape" "$fish_color_operator" "$fish_color_end" "$fish_color_quote" "$fish_color_autosuggestion" "$fish_color_user" "$fish_color_valid_path" "$fish_color_cwd" "$fish_color_cwd_root" "$fish_color_match" "$fish_color_search_match" "$fish_color_selection" "$fish_pager_color_prefix" "$fish_pager_color_completion" "$fish_pager_color_description" "$fish_pager_color_progress" "$fish_color_history_current" "$fish_color_host"
end