80 lines
2.4 KiB
Bash
80 lines
2.4 KiB
Bash
#!/bin/zsh
|
|
#
|
|
# .aliases - Set whatever shell aliases you want.
|
|
#
|
|
|
|
# single character aliases - be sparing!
|
|
alias _=sudo
|
|
alias l=ls
|
|
|
|
# mask built-ins with better defaults
|
|
alias vi=vim
|
|
|
|
# more ways to ls
|
|
alias ll='ls -lh'
|
|
alias la='ls -lAh'
|
|
alias ldot='ls -ld .*'
|
|
|
|
# fix common typos
|
|
alias quit='exit'
|
|
alias cd..='cd ..'
|
|
|
|
# tar
|
|
alias tarls="tar -tvf"
|
|
alias untar="tar -xf"
|
|
|
|
# find
|
|
alias fd='find . -type d -name'
|
|
alias ff='find . -type f -name'
|
|
|
|
# url encode/decode
|
|
alias urldecode='python3 -c "import sys, urllib.parse as ul; \
|
|
print(ul.unquote_plus(sys.argv[1]))"'
|
|
alias urlencode='python3 -c "import sys, urllib.parse as ul; \
|
|
print (ul.quote_plus(sys.argv[1]))"'
|
|
|
|
# misc
|
|
alias please=sudo
|
|
alias zshrc='${EDITOR:-vim} "${ZDOTDIR:-$HOME}"/.zshrc'
|
|
alias zbench='for i in {1..10}; do /usr/bin/time zsh -lic exit; done'
|
|
alias zdot='cd ${ZDOTDIR:-~}'
|
|
|
|
# kangaroot asciidoc
|
|
#
|
|
alias asciidoc="asciidoctor-pdf -a pdf-style=kanga-theme.yml -a pdf-stylesdir=/home/sejo/workspace/kangaroot/asciidoc -a pdf-fontsdir=/home/sejo/workspace/kangaroot/asciidoc/font $@"
|
|
|
|
# kubernetes alias
|
|
alias k="kubectl"
|
|
|
|
# git aliases
|
|
alias gb='git branch'
|
|
alias gba='git branch --all'
|
|
alias gbd='git branch --delete'
|
|
alias gbD='git branch --delete --force'
|
|
alias gbl='git blame -w'
|
|
alias gco='git checkout'
|
|
alias glgg='git log --graph'
|
|
alias glgga='git log --graph --decorate --all'
|
|
alias glgm='git log --graph --max-count=10'
|
|
alias glods='git log --graph --pretty="%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ad) %C(bold blue)<%an>%Creset" --date=short'
|
|
alias glod='git log --graph --pretty="%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ad) %C(bold blue)<%an>%Creset"'
|
|
alias glola='git log --graph --pretty="%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ar) %C(bold blue)<%an>%Creset" --all'
|
|
alias glols='git log --graph --pretty="%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ar) %C(bold blue)<%an>%Creset" --stat'
|
|
alias glol='git log --graph --pretty="%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ar) %C(bold blue)<%an>%Creset"'
|
|
alias glo='git log --oneline --decorate'
|
|
alias glog='git log --oneline --decorate --graph'
|
|
alias gloga='git log --oneline --decorate --graph --all'
|
|
alias glg='git log --stat'
|
|
alias glgp='git log --stat --patch'
|
|
alias gignored='git ls-files -v | grep "^[[:lower:]]"'
|
|
alias gfg='git ls-files | grep'
|
|
alias gl='git pull'
|
|
alias gp='git push'
|
|
alias gpd='git push --dry-run'
|
|
alias gst='git status --short --branch'
|
|
|
|
#aliases for rusttools
|
|
|
|
alias ls="exa --icons"
|
|
alias cat="bat --style=auto"
|