mirror of
https://github.com/oh-my-fish/oh-my-fish.git
synced 2025-02-21 14:12:43 +08:00
FishFace theme [#67]
This commit is contained in:
parent
f50e96b8fc
commit
098351a9bb
5
themes/fishface/README.md
Normal file
5
themes/fishface/README.md
Normal file
@ -0,0 +1,5 @@
|
||||
## FishFace
|
||||
|
||||
Shows an ASCII fish which is blue or green when in a git repo.
|
||||
|
||||

|
20
themes/fishface/fish_prompt.fish
Normal file
20
themes/fishface/fish_prompt.fish
Normal file
@ -0,0 +1,20 @@
|
||||
# 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
|
Loading…
x
Reference in New Issue
Block a user