Skip to content

Instantly share code, notes, and snippets.

@edcrypt
Created October 21, 2015 15:18
Show Gist options
  • Save edcrypt/59be70f8537bc18617a6 to your computer and use it in GitHub Desktop.
Save edcrypt/59be70f8537bc18617a6 to your computer and use it in GitHub Desktop.
function fish_prompt --description Based\ on\ \'Simple\ Pythonista\',\ displays\ GIT\ and\ Job\ count\ info\ as\ well.
set_color yellow
printf '%s' (whoami)
set_color normal
printf ' at '
set_color magenta
printf '%s' (hostname|cut -d . -f 1)
set_color normal
printf ' in '
set_color $fish_color_cwd
printf '%s' (prompt_pwd)
set_color normal
set -g __fish_git_prompt_show_informative_status 1
__fish_git_prompt
set jobs_count (count (jobs -p))
echo -n -s " j:" $jobs_count
# Line 2
echo
if test $VIRTUAL_ENV
printf "(%s) " (set_color blue)(basename $VIRTUAL_ENV)(set_color normal)
end
printf '↪ '
set_color normal
end
@edcrypt
Copy link
Author

edcrypt commented Oct 21, 2015

Todo: choose a color for jobs count.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment