-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbashrc
More file actions
48 lines (39 loc) · 1.08 KB
/
bashrc
File metadata and controls
48 lines (39 loc) · 1.08 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
# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias ls='ls --color=auto'
#alias dir='dir --color=auto'
#alias vdir='vdir --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
fi
# some more ls aliases
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
# tat function to attach to tmux session
function tat {
name=$(basename `pwd` | sed -e 's/\.//g')
if tmux ls 2>&1 | grep "$name"; then
tmux attach -t "$name"
elif [ -f .envrc ]; then
direnv exec / tmux new-session -s "$name"
else
tmux new-session -s "$name"
fi
}
alias cl='clear'
alias gs='git status'
alias ga='git add'
alias gc='git commit'
alias gco='git checkout'
alias gpl='git pull'
alias gps='git push'
#log
alias gl='git log'
alias glg='git log --graph --oneline --all'
alias gll='git log --oneline --decorate --all --graph'
alias gd='git diff'
alias gb='git branch'
alias gba='git branch -a'