Back (Current repo: dotfiles)

my dotfiles to make it easy to transfer my settings
To clone this repository:
git clone https://git.viktor1993.net/dotfiles.git
Log | Download | Files | Refs

.bashrc (406B)


parse_git_branch() {
    if [ "$(git rev-parse --is-inside-work-tree 2> /dev/null)" = true ]; then
        ADD_TO_PROMPT=$(git branch 2> /dev/null | awk '!/^[^*]/' | awk '{match($0, /[a-zA-Z0-9\-_]+/); print "("substr($0, RSTART, RLENGTH)") ";}')
        echo "$ADD_TO_PROMPT"
    fi
}

export PS1="$PS1\$(parse_git_branch)"
export MYSQL_PS1="(\u@\h) [\d]>"
export SUDO_ASKPASS=$HOME/.local/bin/dmenupass