2016-02-12 01:33:43 +00:00
|
|
|
# This is exported because the venv is now included here
|
2015-06-11 00:16:51 +00:00
|
|
|
set -xg VIRTUAL_ENV_DISABLE_PROMPT 1
|
2015-06-03 20:53:20 +00:00
|
|
|
|
2016-02-12 01:33:43 +00:00
|
|
|
# Returns identifier for target from github.com/heroku/force
|
|
|
|
# requires teh following additional script
|
|
|
|
# https://github.com/ViViDboarder/shoestrap/blob/clean-shoes/assets/default/force-cli/force-target
|
2019-11-21 20:05:36 +00:00
|
|
|
function _force_target_name
|
|
|
|
if [ (git config force.use) ]
|
|
|
|
set -l org (force-target)
|
|
|
|
echo "[$org]"
|
2015-06-03 20:53:20 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2019-11-21 20:05:36 +00:00
|
|
|
function _virtual_env_name
|
|
|
|
if [ $VIRTUAL_ENV ]
|
|
|
|
set -l venv (basename "$VIRTUAL_ENV")
|
|
|
|
echo "[$venv]"
|
2015-06-03 20:53:20 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-04-21 20:19:50 +00:00
|
|
|
function _right_prompt_aux
|
|
|
|
# To override use `funced _fish_right_prompt_user; and funcsave _fish_right_prompt_user`
|
|
|
|
functions -q _fish_right_prompt_user; and _fish_right_prompt_user
|
|
|
|
end
|
|
|
|
|
2016-02-12 01:33:43 +00:00
|
|
|
function fish_right_prompt
|
2019-11-21 20:05:36 +00:00
|
|
|
# Set prompt showing full force instance or virtualenv names
|
2022-01-28 20:03:19 +00:00
|
|
|
echo -n (set_color green) (_force_target_name) (_virtual_env_name) (_right_prompt_aux)
|
2019-11-21 20:05:36 +00:00
|
|
|
set_color normal
|
2015-06-03 20:53:20 +00:00
|
|
|
end
|