mirror of
https://github.com/oh-my-fish/oh-my-fish.git
synced 2024-11-30 04:23:36 +08:00
Add option to not show untracked files as dirty in git status
This commit is contained in:
parent
b43716907f
commit
c45b844a55
|
@ -1,10 +1,18 @@
|
||||||
# name: RobbyRussel
|
# name: RobbyRussel
|
||||||
|
#
|
||||||
|
# You can override some default options in your config.fish:
|
||||||
|
# set -g theme_disable_untracked_files_dirty yes
|
||||||
|
|
||||||
function _git_branch_name
|
function _git_branch_name
|
||||||
echo (command git symbolic-ref HEAD ^/dev/null | sed -e 's|^refs/heads/||')
|
echo (command git symbolic-ref HEAD ^/dev/null | sed -e 's|^refs/heads/||')
|
||||||
end
|
end
|
||||||
|
|
||||||
function _is_git_dirty
|
function _is_git_dirty
|
||||||
|
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)
|
echo (command git status -s --ignore-submodules=dirty ^/dev/null)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function fish_prompt
|
function fish_prompt
|
||||||
|
|
Loading…
Reference in New Issue
Block a user