-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.sh
61 lines (51 loc) · 1.21 KB
/
config.sh
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
#!/bin/sh
#configure bashrc to add aliases
sudo tee -a /etc/bash.bashrc << EOT
# kube aliases
alias k='kubectl'
alias kubetcl='kubectl'
alias ka='kubectl apply '
alias kg='kubectl get'
alias kga='kubectl get all'
alias kgi='kubectl get ingress'
alias kgp='kubectl get pods'
alias kd='kubectl describe'
alias kdp='kubectl describe pod'
alias kdel='kubectl delete'
alias kl='kubectl logs'
alias kex='kubectl exec -it'
alias kpf='kubectl port-forward'
# helm aliases
alias h='helm'
alias hl='helm ls'
# keep kube & helm autocompletion with k & h aliases
complete -o default -F __start_kubectl kubectl
complete -o default -F __start_kubectl kubetcl
complete -o default -F __start_kubectl k
complete -o default -F __start_helm helm
complete -o default -F __start_helm h
# watch to keep autocompletion when using
alias w='watch '
alias watch='watch '
# git aliases
alias gc='git clone'
alias gd='git diff'
alias gcm='git commit -m'
alias gs='git status'
alias gl='git logs'
alias glo='git logs --oneline'
alias gp='git push'
alias ga='git add'
# divers
alias stp='sudo !! '
EOT
# config vim
sudo tee -a /etc/vim/vimrc << EOT
filetype plugin indent on
set showmatch
set incsearch
set mouse=a
set number
syntax on
set incsearch
EOT