Skip to content

Instantly share code, notes, and snippets.

@libbkmz
Last active August 29, 2015 13:57
Show Gist options
  • Select an option

  • Save libbkmz/9642299 to your computer and use it in GitHub Desktop.

Select an option

Save libbkmz/9642299 to your computer and use it in GitHub Desktop.
if test -d .hg
set -g __hg_branch (hg branch 2> /dev/null)
set -g __hg_dirty (hg status 2> /dev/null | grep -v "?" | sort | uniq | head -c1)
printf "%s@%s %s%s%s (%s%s%s%s%s)%s%s%s%s " $USER $__fish_prompt_hostname "$__fish_prompt_cwd" (prompt_pwd) "$__fish_prompt_normal" (set_color -b 5fff5f) (set_color red) $__hg_branch (set_color normal) (set_color -b normal) (set_color red) $__hg_dirty (set_color normal) $user_prompt
else
printf '%s@%s %s%s%s%s%s ' $USER $__fish_prompt_hostname "$__fish_prompt_cwd" (prompt_pwd) "$__fish_prompt_normal" $user_prompt
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment