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
|
[ ${filename:0:1} = "_" ] && continue
|
||||||
dest="${BASH_IT}/${file_type}/enabled/${filename}"
|
dest="${BASH_IT}/${file_type}/enabled/${filename}"
|
||||||
if [ ! -e "${dest}" ]; then
|
if [ ! -e "${dest}" ]; then
|
||||||
ln -s "${src}" "${dest}"
|
ln -s "../available/${filename}" "${dest}"
|
||||||
else
|
else
|
||||||
echo "File ${dest} exists, skipping"
|
echo "File ${dest} exists, skipping"
|
||||||
fi
|
fi
|
||||||
|
|
@ -57,7 +57,7 @@ function load_some() {
|
||||||
read -p "Would you like to enable the ${file_name%%.*} $file_type? [Y/N] " RESP
|
read -p "Would you like to enable the ${file_name%%.*} $file_type? [Y/N] " RESP
|
||||||
case $RESP in
|
case $RESP in
|
||||||
[yY])
|
[yY])
|
||||||
ln -s "$path" "$BASH_IT/$file_type/enabled"
|
ln -s "../available/${file_name}" "$BASH_IT/$file_type/enabled"
|
||||||
break
|
break
|
||||||
;;
|
;;
|
||||||
[nN])
|
[nN])
|
||||||
|
|
|
||||||
|
|
@ -278,7 +278,7 @@ _enable-thing ()
|
||||||
do
|
do
|
||||||
plugin=$(basename $f)
|
plugin=$(basename $f)
|
||||||
if [ ! -h $BASH_IT/$subdirectory/enabled/$plugin ]; then
|
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
|
fi
|
||||||
done
|
done
|
||||||
else
|
else
|
||||||
|
|
@ -296,7 +296,7 @@ _enable-thing ()
|
||||||
|
|
||||||
mkdir -p $BASH_IT/$subdirectory/enabled
|
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
|
fi
|
||||||
|
|
||||||
printf '%s\n' "$file_entity enabled."
|
printf '%s\n' "$file_entity enabled."
|
||||||
|
|
|
||||||
|
|
@ -53,9 +53,16 @@ function powerline_shell_prompt {
|
||||||
}
|
}
|
||||||
|
|
||||||
function powerline_virtualenv_prompt {
|
function powerline_virtualenv_prompt {
|
||||||
if [[ -n "$VIRTUAL_ENV" ]]; then
|
local environ=""
|
||||||
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}"
|
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}
|
LAST_THEME_COLOR=${VIRTUALENV_THEME_PROMPT_COLOR}
|
||||||
else
|
else
|
||||||
VIRTUALENV_PROMPT=""
|
VIRTUALENV_PROMPT=""
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue