chezmoi/dot_dotfiles/oh-my-zsh/custom/09_alias.zsh
2022-06-08 16:33:03 +02:00

27 lines
884 B
Bash

alias rm="rm -v"
alias vi="vim"
alias cp="cp -v"
alias mv="mv -v"
alias ls="ls $LS_OPTIONS -hFtr"
alias ll="ls $LS_OPTIONS -lAhFtr"
alias ccat="pygmentize -O style=monokai -f 256 -g"
alias dig="dig +nocmd any +multiline +noall +answer"
alias prettyjson='python -m json.tool'
# aliases to quickly switch between two keyboard layouts
alias aoeu="setxkbmap us"
alias asdf="setxkbmap dvorak"
disable -r time # disable shell reserved word
alias time='time -p ' # -p for POSIX output
# git shortcuts
alias gac="git add -A && git commit -a"
alias dddu="docker-compose down && docker-compose up -d"
# yank the last command from history into the clipboard
alias yk="cat ~/.zsh_history | tail -n 2 | head -n 1 | cut -d ';' -f 2- | xclip -selection clipboard"
# add space after sudo to make it consider aliases, other 'sudo vi' would fail for not aliasing to vim
alias sudo="sudo "