function fish_right_prompt -d "Displays git branch and dirty state on the right"
  set -l cyan (set_color cyan)
  set -l red (set_color red)
  set -l normal (set_color normal)
  set -l yellow (set_color cccc00)
  set -l git_branch (git_branch_name)

  if test $git_branch
    if test git_is_dirty
      echo -n -s $cyan '‹' $yellow $git_branch $red '*' $cyan '›' $normal
    else
      echo -n -s $cyan '‹' $yellow $git_branch $cyan '›' $normal
    end
  end
end

function fish_right_prompt -d "Displays git branch and dirty state on the right"
  set -l cyan (set_color cyan)
  set -l red (set_color red)
  set -l normal (set_color normal)
  set -l yellow (set_color cccc00)
  set -l git_branch (git_branch_name)

  if test $git_branch
    git_is_dirty; and begin
      echo -ns $cyan '‹' $yellow $git_branch $red '*' $cyan '›' $normal
    end; or begin
      echo -ns $cyan '‹' $yellow $git_branch $cyan '›' $normal
    end
  end
end

Fix bug in git prompt
Fix bug in git prompt

The function git_is_dirty doesn't return anything (due to lack of echo).
It sets the exit code in $status which the condition wasn't checking.

dideler/dotfiles,dideler/dotfiles