-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbashrc
56 lines (48 loc) · 1.12 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
#
# ~/.bashrc
#
# If using Cygwin, these will have to be unset
if [ $OS ] && [ $OS == "Windows_NT" ]; then
unset TMP
unset TEMP
fi
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
alias ls='ls --color=auto --group-directories-first'
alias l.='ls -d .*'
alias ll='ls -l'
alias la='ls -la'
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
alias grep='grep --color'
alias egrep='egrep --color=auto'
alias fgrep='fgrep --color=auto'
alias vi='vim'
alias q=exit
alias t=task
alias ack='ack-grep'
GRN='\[$(tput setaf 2)\]'
BLU='\[$(tput setaf 4)\]'
RED='\[$(tput setaf 1)$(tput bold)\]'
RST='\[$(tput sgr0)\]'
export PS1="\$(
RET=\$?
printf '%s' $GRN \u @\h ' ' $RST $BLU \W $RST
if [[ \$RET != 0 ]]; then
printf '%s' ' ' $RED [\$RET] $RST
fi
printf '%s' $BLU ' ' $ ' ' $RST
)"
unset GRN BLU RED RST
export HISTCONTROL=ignoredups
export HISTFILESIZE=10000
export HISTSIZE=$HISTFILESIZE
export EDITOR=vim
export VISUAL=vim
# Load z
. ~/.zdir/z.sh
# tmux borks vim without this, even though I only use 16 colors
if [ $TERM == "xterm" ]; then
export TERM=xterm-256color
fi