-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbashrc
86 lines (77 loc) · 2.74 KB
/
bashrc
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
export EDITOR=/usr/bin/vim
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything:
[ -z "$PS1" ] && return
# don't put duplicate lines in the history. See bash(1) for more options
export HISTCONTROL=ignoredups
export HISTSIZE=10000
# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize
# enable color support of ls and also add handy aliases
if [ "$TERM" != "dumb" ]; then
TERM=xterm-256color
fi
if [ "$TERM" != "dumb" ]; then
eval "`dircolors -b`"
# some more ls aliases
alias ll='ls --color -lah'
#alias la='ls -A'
#alias l='ls -CF'
alias ls="ls -h --color=auto"
fi
alias ssh-add="ssh-add -t 43200 -c"
alias grep="grep --color"
alias opannotate-asm='opannotate -a --objdump-params -S'
ulimit -c unlimited
# Environnement
if [ "$PS1" ]; then
function __prompt_git()
{
local git_dir ref br;
git_dir=$(git-rev-parse --git-dir 2> /dev/null) || return
ref=$(git-symbolic-ref HEAD 2> /dev/null) || return
br=${ref#refs/heads/}
#nb=$(git status |grep modified:|wc -l 2> /dev/null) || return
#if test $nb -eq 0; then
echo -e "[git:$br]"
#else
# echo -e "[git:$br($nb)]"
#fi
}
# PS1='\[\e[34;1m\]\u@\[\e[32;1m\]\H:\[\e[31;1m\]$(__prompt_git)\[\e[0m\]\w\[\e[31;1m\]\$ \[\e[0m\]'
PS1='\[\e[34;1m\]\u@\[\e[32;1m\]\H:\[\e[31;1m\]$(__git_ps1 "[%s]")\[\e[0m\] \[\033[1;36m\]\w\[\e[31;1m\]\$ \[\e[0m\]'
fi
# Pour plus de sécurité
[[ $UID == 0 ]] && export PS1='\[\033[00;36m\][\h\[\033[00m\]: \w\[\033[00;36m\]]\[\033[00m\] \[\033[01;31m\]\u# \[\033[00m\]'
# This line was appended by KDE
# Make sure our customised gtkrc file is loaded.
export GTK2_RC_FILES=$HOME/.gtkrc-2.0
if [ `uname -s` == "SunOS" ]; then
export PATH=/usr/local/bin:$PATH
alias vi="vim"
fi
export PATH=/srv/tools/bin:/home/aurel/local/bin:/home/aurel/bin:/home/aurel/.gem/ruby/1.8/bin:$PATH
export PYTHONPATH=/srv/tools/lib/python
export MCMS_HOME=/home/aurel/mcms-aurel
if [ `uname -s` == "SunOS" ]; then
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib:/opt/csw/lib
fi
export LD_LIBRARY_PATH
if [ -d /home/aurel/.ccache ] ; then
export CCACHE_DIR=/home/aurel/.ccache
export PATH="/usr/lib/ccache:${PATH}"
export CCACHE_NOCOMPRESS=1
fi
if [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
lastcore () {
CORE_PATH=/srv/data/cores/
CORE=$(ls -rt $CORE_PATH | tail -n1)
CORE_EXE=$(echo $CORE | sed -e "s/\(.*\)\..*\..*\..*/\1/")
CORE_EXE_PATH=$(find . -type f -name $CORE_EXE -print -quit)
gdb $CORE_EXE_PATH $CORE_PATH$CORE "$@"
}