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
|
2016-10-24 06:02:14 +08:00
|
|
|
echo -n (prompt_hostname)
|
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
|