2012-09-06 16:30:26 +08:00
|
|
|
# name: Simple Pythonista
|
|
|
|
# author: davbo
|
|
|
|
|
|
|
|
function fish_prompt
|
2016-11-02 10:19:45 +08:00
|
|
|
if not set -q VIRTUAL_ENV_DISABLE_PROMPT
|
|
|
|
set -g VIRTUAL_ENV_DISABLE_PROMPT true
|
|
|
|
end
|
|
|
|
set_color yellow
|
2019-09-19 14:35:16 +08:00
|
|
|
printf '%s' $USER
|
2016-11-02 10:19:45 +08:00
|
|
|
set_color normal
|
|
|
|
printf ' at '
|
2012-09-06 16:30:26 +08:00
|
|
|
|
2016-11-02 10:19:45 +08:00
|
|
|
set_color magenta
|
|
|
|
echo -n (prompt_hostname)
|
|
|
|
set_color normal
|
|
|
|
printf ' in '
|
2012-09-06 16:30:26 +08:00
|
|
|
|
2016-11-02 10:19:45 +08:00
|
|
|
set_color $fish_color_cwd
|
|
|
|
printf '%s' (prompt_pwd)
|
|
|
|
set_color normal
|
2012-09-06 16:30:26 +08:00
|
|
|
|
2016-11-02 10:19:45 +08:00
|
|
|
# Line 2
|
|
|
|
echo
|
2021-03-11 23:53:58 +08:00
|
|
|
if test -n "$VIRTUAL_ENV"
|
2023-01-26 03:04:57 +08:00
|
|
|
printf "(%s) " (set_color blue)(path basename $VIRTUAL_ENV)(set_color normal)
|
2016-11-02 10:19:45 +08:00
|
|
|
end
|
|
|
|
printf '↪ '
|
|
|
|
set_color normal
|
2012-09-06 16:30:26 +08:00
|
|
|
end
|