-
Notifications
You must be signed in to change notification settings - Fork 1
/
.zsh.aliases
66 lines (44 loc) · 1.58 KB
/
.zsh.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
#!/usr/bin/env bash
# Aliases -------------------------------------------------
alias kc='kubectl'
alias kx='kubectx'
# print ansi color codes
alias colors='for code in {000..255}; do print -P -- "$code: %F{$code}Color%f"; done'
# open new file in vim with previous day's date (journal)
alias journal='nvim $(date -v-1d "+%d-%m-%Y").md'
# alias for function `doro` defined above
# runs a trivial pomodoro timer on the cli
alias pomo='doro'
# fuzzy find and checkout git branch
alias bra='git checkout $(git branch | fzf --layout=reverse) 2> /dev/null'
# fuzzy search history
alias hgrep='cat ~/.zsh_history | fzf'
# consistency bw terminal and editor, not really
alias :q=exit
# append P to copy command output via pipe
alias -g P='| pbcopy'
# quick history grep
alias h='cat ~/.zsh_history | rg'
# ask for confirmation before rm
alias rm='rm -i'
# adds trailing '/' for dirs and -G for colors
alias ls='ls -aF'
# list mode for ls with above flags
alias ll='ls -alhF'
# open .zshrc for editing
alias ez='nvim ~/.zshrc'
# source .zshrc
alias sz='source ~/.zshrc 2> /dev/null'
# skip .git dir in trees
alias lt='tree -I '.git''
# colored output in grep
alias grep='grep --colour=auto'
# save to chars
alias vi='nvim'
# fuzzy choose a venv to work on
alias venv='workon $(workon | fzf --layout=reverse)'
# deploy blog to localhost
alias bejs='bundle exec jekyll serve'
# check current application tag running on cluster
alias atag='kubectl get pods | head -n 2 | grep coderunner | awk '{print $1}' | xargs kubectl describe pod | grep git | awk -F ":" '{print $3}''
alias isc='osc -A api.suse.de'