-
Notifications
You must be signed in to change notification settings - Fork 0
/
dot_aliasesrc
96 lines (82 loc) · 2.2 KB
/
dot_aliasesrc
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
88
89
90
91
92
93
94
95
96
#!/usr/bin/env zsh
# Chezmoi
alias cz='chezmoi'
alias cze='chezmoi edit --apply'
alias czcd='chezmoi cd'
# Shortcuts
alias reloadrc='source ~/.zshrc'
alias editrc='cze ~/.zshrc'
alias editaliases='cze ~/.aliasesrc'
# Navigation typo catchers
alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'
alias .....='cd ../../../..'
alias ......='cd ../../../../..'
alias cd.='cd ..'
alias cd..='cd ..'
alias cd...='cd ../../'
alias cd....='cd ../../../'
alias cd.....='cd ../../../../'
# Commands defaults
alias c='clear'
alias l='eza --all --long --git --no-time --header --icons --classify=auto --colour=always'
alias v='nvim'
alias vi='nvim'
alias vim='nvim'
alias which='type -p'
alias cat='bat'
alias find='fd'
alias rm='trash -F'
alias top='btm'
# Common directories
alias cdd="cd $HOME/Downloads"
alias cdsrc="cd $SOURCES_ROOT"
# Git
alias g='git'
alias gcl='git clone'
alias gco='git checkout'
alias gcb='git checkout -b'
alias gst='git status'
alias gss='git status -s'
alias gcm='git commit -m'
alias gcam='git commit -a -m'
alias gpu='git push -u origin'
alias gp='git push'
alias gl='git pull'
alias grb='git rebase'
alias grbi='git rebase -i'
alias grbia='git rebase -i --autosquash'
alias grba='git rebase --abort'
alias grbc='git rebase --continue'
alias glol="git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset'"
alias lg="lazygit"
# Yarn
alias yrd="yarn run dev"
alias yrsd="yarn run start:dev"
alias yrb="yarn run build"
alias yrl="yarn run lint"
alias yrs="yarn run start"
alias yrt="yarn run test"
alias yrtdd="yarn run tdd"
alias yru="yarn run unit"
# NPM
alias nrd="npm run dev"
alias nrsd="npm run start:dev"
alias nrb="npm run build"
alias nrl="npm run lint"
alias nrs="npm run start"
alias nrt="npm run test"
# Docker
alias dps="docker ps --format \"table {{.ID}}\t{{.Names}}\t{{.Image}}\t{{.Ports}}\""
alias dcupd="docker compose up -d"
alias dsa='docker stop $(docker ps -q)'
alias drma='dsa && docker rm $(docker ps -q)'
# Kubernetes
alias k="kubectl"
alias mypublicip='curl ifconfig.me'
alias mylocalip='ipconfig getifaddr en1'
# Easier HTTP requests
for method in GET HEAD POST PUT DELETE TRACE OPTIONS; do
alias "${method}"="lwp-request -m '${method}'"
done