2012-09-06 16:30:26 +08:00
|
|
|
# name: Simple Pythonista
|
|
|
|
# author: davbo
|
|
|
|
|
|
|
|
|
|
|
|
function fish_prompt
|
2015-09-01 03:23:15 +08:00
|
|
|
if not set -q VIRTUAL_ENV_DISABLE_PROMPT
|
|
|
|
set -g VIRTUAL_ENV_DISABLE_PROMPT true
|
|
|
|
end
|
2012-09-06 16:30:26 +08:00
|
|
|
set_color yellow
|
|
|
|
printf '%s' (whoami)
|
|
|
|
set_color normal
|
|
|
|
printf ' at '
|
|
|
|
|
|
|
|
set_color magenta
|
2015-10-16 07:01:12 +08:00
|
|
|
printf '%s' (hostname|cut -d . -f 1)
|
2012-09-06 16:30:26 +08:00
|
|
|
set_color normal
|
|
|
|
printf ' in '
|
|
|
|
|
|
|
|
set_color $fish_color_cwd
|
|
|
|
printf '%s' (prompt_pwd)
|
|
|
|
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
|