-
Notifications
You must be signed in to change notification settings - Fork 2
/
.aliases
70 lines (58 loc) · 1.83 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
# vim: set ft=sh:
# shellcheck shell=bash
alias pyc='find . -name "*.pyc" -exec rm -rf {} \; ; find . -name "__pycache__" -type d -print0 | xargs -0 rm -rf'
if hash envchain 2>/dev/null ; then
alias fossa='envchain fossa fossa'
alias brew='envchain brew brew'
alias drone='envchain drone drone'
alias doctl='envchain doctl doctl'
alias docker-machine='envchain docker-machine docker-machine'
fi
if hash bat 2>/dev/null ; then
alias cat='bat'
if [[ -n "${ZSH_VERSION}" ]] ; then
alias -g -- --help='--help 2>&1 | bat --language=help --style=plain'
fi
fi
# rewrite git commands to use hub if available
if hash hub 2>/dev/null ; then
alias git='hub'
fi
if hash nvim 2>/dev/null ; then
alias vim=nvim
alias vimdiff=nvim -d
fi
if hash mutagen-compose 2>/dev/null ; then
alias docker-compose=mutagen-compose
fi
if hash mutagen 2>/dev/null ; then
alias mslid=mutagen sync list --template '{{ range $idx, $e := . }}{{ printf "%s\n" $e.Identifier }}{{ end }}'
fi
if [[ "$(uname)" == "Darwin" ]] ; then
alias mtr='sudo /usr/local/sbin/mtr'
fi
if [[ -n "${KITTY_WINDOW_ID}" ]] ; then
alias ssh='kitty +kitten ssh'
fi
# git aliases
alias g='git'
alias config='git --git-dir=$HOME/.dotfiles.git/ --work-tree=$HOME'
alias gst='git status'
alias gadd='git add'
alias grm='git rm'
alias gco='git checkout'
alias gci='git commit'
alias gtree='git tree'
alias dcup='docker-compose up'
alias dcdown='docker-compose up'
alias dcstop='docker-compose stop'
alias dcrm='docker-compose rm'
alias dclog='docker-compose logs'
alias dcps='docker-compose ps'
alias dce='docker-compose exec'
alias dceweb='docker-compose exec web'
alias dcedb='docker-compose exec db'
alias dcewp='docker-compose exec wordpress wp'
alias dcb='docker-compose build'
alias dcp='docker-compose push'
alias venv='source .venv/bin/activate'