-
Notifications
You must be signed in to change notification settings - Fork 0
/
.aliases
87 lines (76 loc) · 2.29 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
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# Dotfiles config
alias dot='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'
# Shell config
alias zshrc='$EDITOR ~/.zshrc'
alias e-aliases='$EDITOR ~/.aliases'
alias e-functions='$EDITOR ~/.functions'
alias e-vimrc='$EDITOR ~/.vim/vimrc'
# alias reload='exec zsh || true'
alias reload='source ~/.zshrc'
case "$OSTYPE" in
darwin*)
alias -g ...='../..'
alias -g ....='../../..'
alias ls='ls -G' # colorise the output
alias brew-update='brew update -v; brew upgrade -v; brew cleanup; brew doctor; brew missing;'
alias cal='echo "Note: using gcal" && gcal -s 1'
alias pb-pretty='pbpaste | python -m json.tool | pbcopy'
# workaround for calendar stop syncing with Exchange server
alias fix-calendar='launchctl stop com.apple.CalendarAgent; launchctl start com.apple.CalendarAgent;'
;;
linux*)
alias open='xdg-open'
alias ls='ls --color=auto' # colorise the output
;;
esac
# Typos
alias cd..='cd ..'
# List files
alias ll='ls -lah'
alias la='ls -A'
alias grep='grep --color=auto'
# Folders
alias temp='mkdir -p ~/Temp/ && cd ~/Temp/'
# Utility
alias h='history'
alias hgrep='fc -El 0 | grep'
alias batp='bat --paging=always'
# Gradle
alias gr='./gradlew'
alias quality='./gradlew ktlintFormat detekt; tput bel;'
alias quality-full='./gradlew ktlintFormat detekt assertMaxHeight checkSortDependencies; tput bel;'
alias ktlint='./gradlew ktlint'
alias ktlintFormat='./gradlew ktlintFormat'
alias detekt='./gradlew detekt'
alias assertMaxHeight='./gradlew assertMaxHeight'
alias sortDepentencies='./gradlew sortDependencies --mode check'
# ADB
alias akey='adb-key'
alias atext='adb-text'
alias atexte='adb-text-enter'
alias arec='adb-rec'
# Git
alias co='git checkout'
alias g='git'
alias ac='git ac'
alias acm='git acm'
alias ga.='git add -A && git st'
alias gac='ga. && ac'
alias gcam='git cam'
alias gll='git ll'
alias gd='git diff'
alias gdc='git diff --cached'
alias gls='git ls'
alias gst='git st'
alias lb='git lb'
alias st='gst'
alias next='git rebase --continue'
alias back='git checkout -'
alias fetch='git fetch --all --prune'
alias squash='git rebase -i'
alias checkpoint='git commit -am "Checkpoint"'
alias dall='diffall'
# alias commit='git commit -am'
# VIM Plugins
alias plug-clean='vim +PlugClean +qall'
alias plug-install='vim +PlugUpdate +PlugUpgrade +PlugInstall +qall'