Merge branch 'master' into hawkbee
commit
a11fccd385
|
|
@ -0,0 +1,4 @@
|
|||
#!/usr/bin/env bash
|
||||
which register-python-argcomplete > /dev/null \
|
||||
&& eval "$(register-python-argcomplete conda)" \
|
||||
|| echo "Please install argcomplete to use conda completion"
|
||||
|
|
@ -36,7 +36,7 @@ function load_all() {
|
|||
[ ${filename:0:1} = "_" ] && continue
|
||||
dest="${BASH_IT}/${file_type}/enabled/${filename}"
|
||||
if [ ! -e "${dest}" ]; then
|
||||
ln -s "${src}" "${dest}"
|
||||
ln -s "../available/${filename}" "${dest}"
|
||||
else
|
||||
echo "File ${dest} exists, skipping"
|
||||
fi
|
||||
|
|
@ -57,7 +57,7 @@ function load_some() {
|
|||
read -p "Would you like to enable the ${file_name%%.*} $file_type? [Y/N] " RESP
|
||||
case $RESP in
|
||||
[yY])
|
||||
ln -s "$path" "$BASH_IT/$file_type/enabled"
|
||||
ln -s "../available/${file_name}" "$BASH_IT/$file_type/enabled"
|
||||
break
|
||||
;;
|
||||
[nN])
|
||||
|
|
|
|||
|
|
@ -278,7 +278,7 @@ _enable-thing ()
|
|||
do
|
||||
plugin=$(basename $f)
|
||||
if [ ! -h $BASH_IT/$subdirectory/enabled/$plugin ]; then
|
||||
ln -s $BASH_IT/$subdirectory/available/$plugin $BASH_IT/$subdirectory/enabled/$plugin
|
||||
ln -s ../available/$plugin $BASH_IT/$subdirectory/enabled/$plugin
|
||||
fi
|
||||
done
|
||||
else
|
||||
|
|
@ -296,7 +296,7 @@ _enable-thing ()
|
|||
|
||||
mkdir -p $BASH_IT/$subdirectory/enabled
|
||||
|
||||
ln -s $BASH_IT/$subdirectory/available/$plugin $BASH_IT/$subdirectory/enabled/$plugin
|
||||
ln -s ../available/$plugin $BASH_IT/$subdirectory/enabled/$plugin
|
||||
fi
|
||||
|
||||
printf '%s\n' "$file_entity enabled."
|
||||
|
|
|
|||
|
|
@ -53,9 +53,16 @@ function powerline_shell_prompt {
|
|||
}
|
||||
|
||||
function powerline_virtualenv_prompt {
|
||||
if [[ -n "$VIRTUAL_ENV" ]]; then
|
||||
virtualenv=$(basename "$VIRTUAL_ENV")
|
||||
VIRTUALENV_PROMPT="$(set_rgb_color ${LAST_THEME_COLOR} ${VIRTUALENV_THEME_PROMPT_COLOR})${THEME_PROMPT_SEPARATOR}${normal}$(set_rgb_color - ${VIRTUALENV_THEME_PROMPT_COLOR}) ${VIRTUALENV_CHAR}$virtualenv ${normal}"
|
||||
local environ=""
|
||||
|
||||
if [[ -n "$CONDA_DEFAULT_ENV" ]]; then
|
||||
environ="conda: $CONDA_DEFAULT_ENV"
|
||||
elif [[ -n "$VIRTUAL_ENV" ]]; then
|
||||
environ=$(basename "$VIRTUAL_ENV")
|
||||
fi
|
||||
|
||||
if [[ -n "$environ" ]]; then
|
||||
VIRTUALENV_PROMPT="$(set_rgb_color ${LAST_THEME_COLOR} ${VIRTUALENV_THEME_PROMPT_COLOR})${THEME_PROMPT_SEPARATOR}${normal}$(set_rgb_color - ${VIRTUALENV_THEME_PROMPT_COLOR}) ${VIRTUALENV_CHAR}$environ ${normal}"
|
||||
LAST_THEME_COLOR=${VIRTUALENV_THEME_PROMPT_COLOR}
|
||||
else
|
||||
VIRTUALENV_PROMPT=""
|
||||
|
|
|
|||
Loading…
Reference in New Issue