-
Notifications
You must be signed in to change notification settings - Fork 0
/
aliases
38 lines (31 loc) · 1.62 KB
/
aliases
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
# aliases
# vim: ft=bash :
# ls and grep color support
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
# Fix UPS Driver issue
alias upsfix="ssh pollux sudo systemctl restart nut-driver.service"
# more ls aliases
alias ll="ls -ahFo --time-style=+'%m-%d-%Y %H:%M:%S'"
alias la="ls -AF"
alias l="ls -F"
# print $PATH nicely
alias path='echo "$PATH" | tr ":" "\n" | sort'
# moving around
alias ..="cd .."
alias back="cd -"
# tmux session alias
alias mux="tmux new -s Home"
# git aliases
alias glean="find -name '*.git' -type d -exec $HOME/dotfiles/bin/gitgc '{}' ';'"
alias gg="git log --all --graph --color=always --pretty=format:'%C(red)%h%C(reset) -%C(auto)%d%C(reset) %s %C(green)(%cr) %C(bold blue)<%an>%C(reset)'"
alias ggs="git log --all --graph --color=always --pretty=format:'GPGSIG%G?%C(red)%h%C(reset) -%C(auto)%d%C(reset) %s %C(green)(%cr) %C(bold blue)<%an>%C(reset)' | sed -e 's/GPGSIGN\(...\)./\11/; s/GPGSIGG\(...\)./\12/; s/GPGSIG.\(...\)./\13/;' | less -RX"
alias gl="git log --color=always --pretty=format:'%C(red)%h%C(reset) -%C(auto)%d%C(reset) %s %C(green)(%cr) %C(bold blue)<%an>%C(reset)'"
alias gls="git log --color=always --pretty=format:'GPGSIG%G?%C(red)%h%C(reset) -%C(auto)%d%C(reset) %s %C(green)(%cr) %C(bold blue)<%an>%C(reset)' | sed -e 's/GPGSIGN\(...\)./\11/; s/GPGSIGG\(...\)./\12/; s/GPGSIG.\(...\)./\13/;' | less -RX"
alias guseless="git branch | grep -v '^*' | xargs git branch -d"
alias gfp="git fetch --prune"