-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.bashrc
More file actions
69 lines (58 loc) · 2.21 KB
/
.bashrc
File metadata and controls
69 lines (58 loc) · 2.21 KB
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
umask 022
ulimit -c 0
shopt -u sourcepath
if [[ "$PS1" ]]; then
# Interactive mode
#-------------------------------------------------------------
# Shell options
#-------------------------------------------------------------
IGNOREEOF=10
unset MAIL
unset command_not_found_handle
shopt -s histappend
shopt -s histverify
shopt -s histreedit
shopt -s checkwinsize
shopt -u hostcomplete
shopt -s checkhash
shopt -s no_empty_cmd_completion
#-------------------------------------------------------------
# Env vars
#-------------------------------------------------------------
unset LANG
export PAGER=less
export EDITOR=vi
export LESS='-X -i -P ?f%f:(stdin). ?lb%lb?L/%L.. [?eEOF:?pb%pb\%..]'
export RSYNC_RSH=ssh
export CVS_RSH=ssh
# Terminal setting
#eval `SHELL=sh tset -sQI`
stty sane erase ^? intr ^C eof ^D susp ^Z quit ^\\ start ^- stop ^-
#-------------------------------------------------------------
# Prompt setting
#-------------------------------------------------------------
export PS1="[\u@\h:\w]\$ "
#-------------------------------------------------------------
# Completion
#-------------------------------------------------------------
complete -d cd
complete -c man
complete -v unset
#-------------------------------------------------------------
# history
#-------------------------------------------------------------
function share_history {
history -a
history -c
history -r
}
PROMPT_COMMAND='share_history'
export HISTSIZE=300000
export HISTFILESIZE=300000
export HISTCONTROL=ignoreboth
export HISTFILE=~/.bash_myhistory
function fceditor () { tt=/tmp/$$.sh; cat $1 | ( read -rd '' s; t=/tmp/$$; echo "function a(){" > $t; echo "$s" >> $t; echo -e " }\n declare -f a" >> $t; chmod +x $t; $t > /dev/null 2>&1; if [ $? = 0 ]; then a=`$t|sed '1,2d;$d;s/....//'`";"`echo "$s"|tail -1|sed 's/^.\+\(#[^#]\+\)$/\1/'`; else a="$s"; fi; rm $t; echo "$a" ) > $tt; vim $tt; sed 's/^ *//' $tt > $1; rm $tt; }
export FCEDIT=fceditor
fi
PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting
[ -f ~/.fzf.bash ] && source ~/.fzf.bash