Created
June 4, 2013 07:33
-
-
Save cnandreu/5704233 to your computer and use it in GitHub Desktop.
~/.config/fish/functions/fish_prompt.fish
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function fish_prompt | |
if not set -q __git_cb | |
set __git_cb (set_color magenta)(git branch ^/dev/null | grep \* | sed 's/* //')(set_color normal) | |
end | |
echo #space between commands | |
set_color yellow | |
printf '%s' (whoami) | |
set_color normal | |
printf ' @ ' | |
set_color cyan | |
printf '%s' (hostname|cut -d . -f 1) | |
set_color normal | |
printf ' in ' | |
set_color $fish_color_cwd | |
printf '%s %s' (prompt_pwd) $__git_cb | |
set_color normal | |
# Line 2 | |
echo | |
if test $VIRTUAL_ENV | |
printf "(%s)" (set_color blue)(basename $VIRTUAL_ENV)(set_color normal) | |
end | |
printf '↪ ' | |
set_color normal | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment