2015-06-03 20:53:20 +00:00
|
|
|
# TODO: Eventually... make pluggable so plugins can add to prompt
|
|
|
|
|
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
|
2015-06-03 20:53:20 +00:00
|
|
|
function _force_target
|
|
|
|
if [ (git config force.use) ]
|
|
|
|
set -l org (force-target)
|
|
|
|
echo " [$org]"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
function _virtual_env
|
|
|
|
if [ $VIRTUAL_ENV ]
|
|
|
|
set -l venv (basename "$VIRTUAL_ENV")
|
|
|
|
echo " [$venv]"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2016-02-12 01:33:43 +00:00
|
|
|
function fish_right_prompt
|
2015-06-03 20:53:20 +00:00
|
|
|
set -l cyan (set_color -o cyan)
|
|
|
|
set -l yellow (set_color -o yellow)
|
|
|
|
set -l red (set_color -o red)
|
|
|
|
set -l blue (set_color -o blue)
|
|
|
|
set -l green (set_color -o green)
|
|
|
|
set -l normal (set_color normal)
|
|
|
|
|
|
|
|
echo -n $green (_force_target) (_virtual_env)
|
|
|
|
set_color normal
|
|
|
|
end
|