X-Git-Url: http://git.vanrenterghem.biz/Dotty.git/blobdiff_plain/7032c200628873fc51b8b16330e9b36f960a454d..b9e948df216e4ecc75f4c56e5648326815926b50:/bash/.bashrc diff --git a/bash/.bashrc b/bash/.bashrc index 0aa3228..9fa83b5 100644 --- a/bash/.bashrc +++ b/bash/.bashrc @@ -6,7 +6,19 @@ [[ $- != *i* ]] && return alias ls='ls --color=auto' -PS1='[\u@\h \W]\$ ' + +git_branch() { + git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' +} + +PS1="[\u@\h \W]\[\033[00;32m\]\$(git_branch)\[\033[00m\]\$ " + +unset SSH_AGENT_PID +if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then + export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)" +fi export GPG_TTY=$(tty) gpg-connect-agent updatestartuptty /bye >/dev/null + +[ -n "$DISPLAY" ] && export BROWSER=firefox || export BROWSER=w3m