forked from tualatrix/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.bashrc_extra
38 lines (30 loc) · 1.42 KB
/
.bashrc_extra
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
KERNEL=`uname -s`
PS1='`a=$?;if [ $a -ne 0 ]; then echo -n -e "\[\e[01;32;41m\]{$a}"; fi`\[\033[01;32m\]\u@\h\[\033[00m\] \[\033[01;34m\]\W`B=$(git branch 2>/dev/null | sed -e "/^ /d" -e "s/* \(.*\)/\1/"); if [ "$B" != "" ]; then S="git"; elif [ -e .bzr ]; then S=bzr; elif [ -e .hg ]; then S="hg"; elif [ -e .svn ]; then S="svn"; else S=""; fi; if [ "$S" != "" ]; then if [ "$B" != "" ]; then M=$S:$B; else M=$S; fi; fi; [[ "$M" != "" ]] && echo -n -e "\[\e[33;40m\]($M)\[\033[01;32m\]\[\e[00m\]"`\[\033[01;34m\] $ \[\e[00m\]'
if [ $KERNEL == "Darwin" ]; then
export LS=gls
export SED=gsed
export BASHCOMPLETION=/usr/local/etc/bash_completion
else
export LS=ls
export SED=sed
export BASHCOMPLETION=/etc/bash_completion
fi
alias ls="$LS --color=auto"
#alias dir="dir --color=auto"
#alias vdir="vdir --color=auto"
alias grep="grep --color=auto"
alias fgrep="fgrep --color=auto"
alias egrep="egrep --color=auto"
# some more ls aliases
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
# 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 $BASHCOMPLETION ] && ! shopt -oq posix; then
. $BASHCOMPLETION
fi
alias pycscope="find -name '*.py' > cscope.files && cscope -R"
alias gendocandopen="epydoc --config epydoc.config && xdg-open apidocs/index.html"
export PATH=$HOME/Sources/tools/bin:$PATH