This commit is contained in:
TheK4n 2021-09-24 17:14:42 +03:00
parent 87ffb344eb
commit 7aa9218d11

View File

@ -18,16 +18,14 @@ export HISTIGNORE="&:l[lsa\.]:[bf]g:exit:q:clear:c:history:h"
parse_git_branch() { parse_git_branch() {
if ! [ -x "$(which git)" ]; then if ! [ -x "$(which git)" ]; then
echo ''
return return
fi fi
local branch local branch
branch="$(git branch --show-current 2> /dev/null)" branch="$(git branch --show-current 2> /dev/null)"
if [[ -n "$branch" ]]; then if [[ -n "$branch" ]]; then
echo "($branch)" echo "($branch)"
else
echo ''
fi fi
} }
@ -38,9 +36,6 @@ virtualenv_info() {
if [[ -n "$VIRTUAL_ENV" ]]; then if [[ -n "$VIRTUAL_ENV" ]]; then
# Strip out the path and just leave the env name # Strip out the path and just leave the env name
echo "($(basename $VIRTUAL_ENV))" echo "($(basename $VIRTUAL_ENV))"
else
# In case you don't have one activated
echo ''
fi fi
} }