|
@@ -15,9 +15,9 @@
|
|
|
# hostname to whether the last call exited with an error to whether background
|
|
# hostname to whether the last call exited with an error to whether background
|
|
|
# jobs are running in this shell will all be displayed automatically when
|
|
# jobs are running in this shell will all be displayed automatically when
|
|
|
# appropriate.
|
|
# appropriate.
|
|
|
|
|
+#
|
|
|
|
|
|
|
|
-### Segment drawing
|
|
|
|
|
-# A few utility functions to make it easy and re-usable to draw segmented prompts
|
|
|
|
|
|
|
+# To define color use spectrum_ls or spectrum_bls commands
|
|
|
|
|
|
|
|
PREVIOUS_BG='NONE'
|
|
PREVIOUS_BG='NONE'
|
|
|
if [[ ( -n "$SSH_CLIENT" || -n "$SSH_TTY" ) ]]; then
|
|
if [[ ( -n "$SSH_CLIENT" || -n "$SSH_TTY" ) ]]; then
|
|
@@ -29,7 +29,7 @@ else
|
|
|
fi
|
|
fi
|
|
|
|
|
|
|
|
CONTEXT_FG_COLOR='white'
|
|
CONTEXT_FG_COLOR='white'
|
|
|
-CONTEXT_BG_COLOR='127'
|
|
|
|
|
|
|
+CONTEXT_BG_COLOR='38'
|
|
|
DIR_FG_COLOR='255'
|
|
DIR_FG_COLOR='255'
|
|
|
DIR_BG_COLOR='243'
|
|
DIR_BG_COLOR='243'
|
|
|
VIRTUALENV_FG_COLOR='236'
|
|
VIRTUALENV_FG_COLOR='236'
|
|
@@ -43,6 +43,9 @@ STATUS_JOBS='cyan'
|
|
|
STATUS_BG_COLOR='236'
|
|
STATUS_BG_COLOR='236'
|
|
|
STATUS_FG_COLOR='default'
|
|
STATUS_FG_COLOR='default'
|
|
|
|
|
|
|
|
|
|
+### Segment drawing
|
|
|
|
|
+# A few utility functions to make it easy and re-usable to draw segmented prompts
|
|
|
|
|
+
|
|
|
# Begin a segment
|
|
# Begin a segment
|
|
|
# Takes two arguments, background and foreground. Both can be omitted,
|
|
# Takes two arguments, background and foreground. Both can be omitted,
|
|
|
# rendering default background/foreground.
|
|
# rendering default background/foreground.
|
|
@@ -176,6 +179,7 @@ prompt_dir() {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
# Virtualenv: current working virtualenv
|
|
# Virtualenv: current working virtualenv
|
|
|
|
|
+# virtualenv plugin is required
|
|
|
prompt_virtualenv() {
|
|
prompt_virtualenv() {
|
|
|
local virtualenv_path="$VIRTUAL_ENV"
|
|
local virtualenv_path="$VIRTUAL_ENV"
|
|
|
if [[ -n $virtualenv_path && -n $VIRTUAL_ENV_DISABLE_PROMPT ]]; then
|
|
if [[ -n $virtualenv_path && -n $VIRTUAL_ENV_DISABLE_PROMPT ]]; then
|