-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.aliases
86 lines (74 loc) · 2.09 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
#!/usr/bin/env bash
# basics
alias python=python3
alias pip=pip3
# BSD doesn't have --color
if $(ls --color >/dev/null 2>&1); then
alias ls="ls --color"
else
export CLICOLOR=1
fi
# vim
#alias vi=nvim
#alias vim=nvim
#alias vimdiff='nvim -d'
alias grep="egrep --color=always"
alias rgv="rg --vimgrep --color=auto"
alias rgt="rg --glob '!*.spec.ts' --glob '!*mx*' --glob '!*mock*'"
#verbose
alias ln="ln -v"
alias mkdir="mkdir -pv"
#git
if type git > /dev/null; then
alias g.="git add -p ."
alias ga="git add"
alias gc="git commit"
alias gcw="git cw"
alias gfr="git fr"
alias gfru="git fru"
alias glo="git log --graph --decorate=full --oneline"
alias glog="git log --graph --decorate=full"
alias gp="git push"
alias gr="git rebase"
alias gres="git restore"
alias gs="git s"
alias gsf="git sf"
alias gst="git status"
alias gstu="git status -uno"
alias gsw="git switch"
gsfz() {
git switch $(git for-each-ref --sort=-committerdate --format='%(refname:short)' refs/ | fzf --height=70% --preview-window=right:60%:wrap --preview='git log --color=always --oneline --decorate {}')
}
fi
#sapling
if type sl >/dev/null 2>&1; then
alias sst="sl status && sl ssl"
alias slc="sl commit --verbose"
alias slci="slc --interactive"
alias sla="sl amend"
alias slai="sl amend --interactive"
alias slr="sl rebase"
fi
#vscode
if type code-insiders >/dev/null 2>&1; then
alias code="code-insiders"
fi
# k8s
if type kubectl >/dev/null 2>&1; then
alias k="kubectl"
alias kns="kubens ce-smartlists-gql"
alias kn="kubens"
alias kpods="k get pods -o wide --sort-by=.metadata.creationTimestamp"
alias kwpod="k get pod -w -o wide --sort-by=.metadata.creationTimestamp"
alias kevents="k get events -w --sort-by=.metadata.creationTimestamp"
alias khpa="k get hpa"
alias kdp="k describe pod"
alias kdhpa="k describe hpa"
if type sledge > /dev/null; then
#alias sl="sledge"
#alias slc="sledge connect"
alias slprod_w="sledge connect wus-prod-a31 && kns"
alias slprod_s="sledge connect scus-prod-a29 && kns"
alias slprod_e="sledge connect eus2-prod-a18 && kns"
fi
fi