Fix git warnings in __bobthefish_prompt_git

pull/95/head
Jingkai Tang 7 years ago
parent 8f055587da
commit 9ec8d2cf24

@ -477,15 +477,15 @@ function __bobthefish_prompt_hg -S -a current_dir -d 'Display the actual hg stat
end
function __bobthefish_prompt_git -S -a current_dir -d 'Display the actual git state'
set -l dirty (command git diff --no-ext-diff --quiet --exit-code; or echo -n "$__bobthefish_git_dirty_glyph")
set -l staged (command git diff --cached --no-ext-diff --quiet --exit-code; or echo -n "$__bobthefish_git_staged_glyph")
set -l dirty (command git diff --no-ext-diff --quiet --exit-code ^/dev/null; or echo -n "$__bobthefish_git_dirty_glyph")
set -l staged (command git diff --cached --no-ext-diff --quiet --exit-code ^/dev/null; or echo -n "$__bobthefish_git_staged_glyph")
set -l stashed (command git rev-parse --verify --quiet refs/stash >/dev/null; and echo -n "$__bobthefish_git_stashed_glyph")
set -l ahead (__bobthefish_git_ahead)
set -l new ''
set -l show_untracked (command git config --bool bash.showUntrackedFiles)
set -l show_untracked (command git config --bool bash.showUntrackedFiles ^/dev/null)
if [ "$theme_display_git_untracked" != 'no' -a "$show_untracked" != 'false' ]
set new (command git ls-files --other --exclude-standard --directory --no-empty-directory)
set new (command git ls-files --other --exclude-standard --directory --no-empty-directory ^/dev/null)
if [ "$new" ]
set new "$__bobthefish_git_untracked_glyph"
end

Loading…
Cancel
Save