2 umask 022 # create new file with '644'
3 ulimit -c 0 # no dump core
5 export LESS='-FRX -i -P ?f%f:(stdin). ?lb%lb?L/%L.. [?eEOF:?pb%pb\%..]'
7 set -o notify # notify end of background job immediately
9 shopt -s histappend # append command history instead of overwrite
10 shopt -s checkhash # check always PATH hash table
11 shopt -s cmdhist # save multi lines command to one line
12 shopt -s no_empty_cmd_completion # no complementation with no input
13 shopt -s histverify # check command history before execute
16 # view last 30 history or search from last 1000 history
18 if [ "$1" ]; then history 1000 | grep "$@"; else history 30; fi
21 # view last 30 history or search from all history
23 if [ "$1" ]; then history | grep "$@"; else history 30; fi
26 if [ -f /usr/share/git/completion/git-prompt.sh ]; then
27 source /usr/share/git/completion/git-prompt.sh
28 export PS1='\u@\h:\w$(__git_ps1)\$ '
30 export PS1='\u@\h:\w\$ '
33 agent="$HOME/.ssh/ssh-agent-$USER"
34 if [ -S "$SSH_AUTH_SOCK" ]; then
35 case $SSH_AUTH_SOCK in
37 ln -snf "$SSH_AUTH_SOCK" $agent && export SSH_AUTH_SOCK=$agent
39 elif [ -S $agent ]; then
40 export SSH_AUTH_SOCK=$agent
45 if [ -d "$HOME/bin" ]; then
46 PATH="$HOME/bin:$PATH"
52 alias screen='screen -U -R'