-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdot_bashrc
29 lines (25 loc) · 948 Bytes
/
dot_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
export HISTCONTROL=ignoredups:ignorespace
export HISTSIZE=5000
export HISTFILESIZE=5000
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias ls='ls --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
fi
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
# From https://twitter.com/ahakcil/status/1230854797613522944
ps1_state(){
ret=$?
if [ $ret -eq 0 ]; then
echo -e "[$(date +%H:%M:%S)]\xF0\x9F\x94\xA5"
else
echo -e "[$(date +%H:%M:%S)]\xF0\x9F\x94\xB4->$ret "
fi
}
export PS1='${debian_chroot:+($debian_chroot)}$(ps1_state)\[\033[01;31m\]\u\[\033[00m\][ \[\033[01;34m\]\w\[\033[00m\] ]\$ '
# From https://twitter.com/n00py1/status/1230755337797394434
script -f /logs/$(date +"%d-%b-%y_%H-%M-%S")_shell.log