mirror of
https://github.com/oh-my-fish/oh-my-fish
synced 2024-11-09 13:10:40 +00:00
21 lines
425 B
Fish
21 lines
425 B
Fish
# name: FishFace
|
|
|
|
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)
|
|
end
|
|
|
|
function fish_prompt
|
|
set -l blue (set_color -o blue)
|
|
set -l green (set_color -o green)
|
|
|
|
if [ (_git_branch_name) ]
|
|
echo -n -s "$green><(((\"> "
|
|
else
|
|
echo -n -s "$blue><(((\"> "
|
|
end
|
|
end
|