Commit 4996bb18 authored by Bruno Pinto's avatar Bruno Pinto

Closes #3: Remove dependency of git plugin from robbyrussell theme

parent 64cd07ae
function git_branch_name
echo (git symbolic-ref HEAD ^/dev/null | sed -e 's|^refs/heads/||')
end
function is_git_dirty
echo (git status -s --ignore-submodules=dirty ^/dev/null)
end
function _git_branch_name
echo (git symbolic-ref HEAD ^/dev/null | sed -e 's|^refs/heads/||')
end
function _is_git_dirty
echo (git status -s --ignore-submodules=dirty ^/dev/null)
end
function fish_prompt function fish_prompt
set -l cyan (set_color -o cyan) set -l cyan (set_color -o cyan)
set -l yellow (set_color -o yellow) set -l yellow (set_color -o yellow)
...@@ -8,11 +16,11 @@ function fish_prompt ...@@ -8,11 +16,11 @@ function fish_prompt
set -l arrow "$red➜ " set -l arrow "$red➜ "
set -l cwd $cyan(basename (prompt_pwd)) set -l cwd $cyan(basename (prompt_pwd))
if [ (git_branch_name) ] if [ (_git_branch_name) ]
set -l git_branch $red(git_branch_name) set -l git_branch $red(_git_branch_name)
set git_info "$blue git:($git_branch$blue)" set git_info "$blue git:($git_branch$blue)"
if [ (is_git_dirty) ] if [ (_is_git_dirty) ]
set -l dirty "$yellow ✗" set -l dirty "$yellow ✗"
set git_info "$git_info$dirty" set git_info "$git_info$dirty"
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment