From c45b844a55b04164d6e80d572567dc52a3cb3583 Mon Sep 17 00:00:00 2001 From: Kirill Sukhanov Date: Sun, 26 Apr 2015 20:15:10 +0300 Subject: [PATCH] Add option to not show untracked files as dirty in git status --- themes/robbyrussell/fish_prompt.fish | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/themes/robbyrussell/fish_prompt.fish b/themes/robbyrussell/fish_prompt.fish index fb057d5..14baaaf 100644 --- a/themes/robbyrussell/fish_prompt.fish +++ b/themes/robbyrussell/fish_prompt.fish @@ -1,10 +1,18 @@ # name: RobbyRussel +# +# You can override some default options in your config.fish: +# set -g theme_disable_untracked_files_dirty yes + function _git_branch_name echo (command git symbolic-ref HEAD ^/dev/null | sed -e 's|^refs/heads/||') end function _is_git_dirty - echo (command git status -s --ignore-submodules=dirty ^/dev/null) + if [ "$theme_disable_untracked_files_dirty" = 'yes' ] + echo (command git status -s --ignore-submodules=dirty --untracked-files=no ^/dev/null) + else + echo (command git status -s --ignore-submodules=dirty ^/dev/null) + end end function fish_prompt