Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # ~/.bashrc: executed by bash(1) for non-login shells.
- # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
- # for examples
- GIT_PS1_SHOWDIRTYSTATE=true
- GIT_PS1_SHOWSTASHSTATE=true
- GIT_PS1_SHOWUNTRACKEDFILES=true
- GIT_PS1_SHOWUPSTREAM=auto
- function __my_git_ps1 {
- log=$(git log --format=format:"%H" 1b99de3a0f49b54433165648ddf30e61e29f40ff 2> /dev/null);
- if [ "$log" == "1b99de3a0f49b54433165648ddf30e61e29f40ff" ]; then
- return
- fi
- __git_ps1
- }
- # If not running interactively, don't do anything
- [ -z "$PS1" ] && return
- if [ -n "$VNCDESKTOP" ]; then
- export EDITOR=emacs
- elif [ -z "$(pidof /usr/bin/X)" ]; then
- export EDITOR=emacs
- else
- export EDITOR=emacsclient
- fi
- # don't put duplicate lines in the history. See bash(1) for more options
- export HISTCONTROL=ignoredups
- # ... and ignore same sucessive entries.
- export HISTCONTROL=ignoreboth
- # check the window size after each command and, if necessary,
- # update the values of LINES and COLUMNS.
- shopt -s checkwinsize
- # make less more friendly for non-text input files, see lesspipe(1)
- [ -x /usr/bin/lesspipe ] && eval "$(lesspipe)"
- # set variable identifying the chroot you work in (used in the prompt below)
- if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
- debian_chroot=$(cat /etc/debian_chroot)
- fi
- PS1="\[\033[G\]\${debian_chroot:+($debian_chroot)}\u@\h:\w\$(__my_git_ps1)\$ "
- # If this is an xterm set the title to user@host:dir
- case "$TERM" in
- xterm*|rxvt*)
- PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD/$HOME/~}$(__my_git_ps1)\007"'
- ;;
- *)
- ;;
- esac
- if [ -f ~/.bash_aliases ]; then
- . ~/.bash_aliases
- fi
- # enable color support of ls and also add handy aliases
- if [ "$TERM" != "dumb" ]; then
- eval "`dircolors -b`"
- alias ls='ls --color=auto'
- fi
- # enable programmable completion features (you don't need to enable
- # this, if it's already enabled in /etc/bash.bashrc and /etc/profile
- # sources /etc/bash.bashrc).
- if [ -f /etc/bash_completion ]; then
- . /etc/bash_completion
- fi
- if [ -f ~/perl5/perlbrew/etc/bashrc ]; then
- . ~/perl5/perlbrew/etc/bashrc
- fi
- if [ -f ~/.rvm/scripts/rvm ]; then
- . ~/.rvm/scripts/rvm
- fi
- function my_cd() {
- set +e
- set +x
- if [ -z "$1" ]; then
- target=~
- else
- target=$1
- fi
- cd $target
- is_at_work=$(perlbrew info|grep 'perl-5\.16\.3@work')
- case `pwd`/ in
- /home/autarch/work/*)
- if [[ "$is_at_work" == "" ]]; then
- perlbrew use perl-5.16.3@work
- fi
- ;;
- *)
- if [[ "$is_at_work" != "" ]]; then
- perlbrew use perl-5.20.1
- fi
- ;;
- esac
- }
- alias cd='my_cd'
- shopt -s no_empty_cmd_completion
- export DEBEMAIL="autarch@urth.org"
- export DEBFULLNAME="Dave Rolsky"
- export GOPATH=~/go
- export PATH=~/bin:$PATH:$GOPATH/bin
- cd .
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement