X-Git-Url: https://www.fleuret.org/cgi-bin/gitweb/gitweb.cgi?p=scripts.git;a=blobdiff_plain;f=bashrc;h=93b9e5642a444eeeec88d0a3b449efc7b26c3920;hp=f50d7ccc640c301107652f80894597d27116eeff;hb=HEAD;hpb=5da30a8f8b2d003b73588a5ad03afda8777f5d94 diff --git a/bashrc b/bashrc index f50d7cc..93b9e56 100644 --- a/bashrc +++ b/bashrc @@ -58,7 +58,7 @@ shopt -s autocd ###################################################################### # added by Miniconda3 installer -export PATH="/home/fleuret/conda/bin:$PATH" +export PATH="${HOME}/conda/bin:$PATH" [ ${TERM} == "dumb" ] || [[ ! -t 0 ]] && return @@ -819,7 +819,7 @@ function ripdvd () { return 1 fi - echo "Attemptin to rip from ${DVD_DEVICE}." + echo "Attempting to rip from ${DVD_DEVICE}." mkdir -p ${HOME}/dvds @@ -908,6 +908,20 @@ function mvtoconfig () { fi } + +###################################################################### +# git prompt + +if which > /dev/null git +then + + parse_git_branch() { + git 2>/dev/null rev-parse --abbrev-ref HEAD | sed -e 's/^\(.*\)$/(\1) /' + } + + export PS_GIT="${VT_GREEN_FG}\$(parse_git_branch)" +fi + ###################################################################### # The complex prompt policy @@ -938,6 +952,8 @@ else [[ "${IDENT}" ]] && IDENT="${IDENT}:" + # IDENT="${PS_GIT}${VT_BLACK_FG}${IDENT}" + if [[ ${USER} == "root" ]] then # If we are root, show that in red @@ -955,7 +971,7 @@ else fi -PS1="${PSCUE}${PS1}" +#PS1="${PSCUE}${PS1}" ###################################################################### # This implements a local history. If we are in a directory containing