# vim:set ft=zsh ai et sw=4 ts=4: # # ~/.zshrc.d/aliases.zsh ## the ls family if test -x "$(command -v exa)"; then alias ls="exa" fi alias l="exa -lFhg" alias la="exa -a" alias ll="exa -lg --git" alias lal="exa -alg --git" alias ldot="exa -gld .*" alias lse="/bin/ls -lZ" lgn() { exa --tree --level=$1 ; } ## greps alias grep="grep --color" alias sgrep="grep -R -n -H -C 5 --exclude-dir={.git,.svn,CVS}" ## copy SSH pubkey to clipboard alias pubkey="more ~/.ssh/id_ed25519.pub | xclip -selection clipboard | echo '==> SSH public key copied'" ## display disk usage with dust alias dud="dust --depth 1 -w 88" ## prompt user before overwriting copied and moved files alias cp="cp -i" alias mv="mv -i" alias rm="rm -i" ## display zsh functions with bat alias zfun="functions | bat -l zsh" ## luamake alias luamake="/home/jas/.local/share/sumneko/lua-language-server/3rd/luamake/luamake" ## assorted globals alias -g H="| head" alias -g T="| tail" alias -g G="| grep" alias -g L="| less -X" alias -g B="| bat" alias -g LL="2>&1 | less" alias -g CA="2>&1 | cat -A" alias -g NE="2> /dev/null" alias -g NUL="> /dev/null 2>&1" alias -g P="2>&1| pygmentize -l pytb" alias -g J="| jq ." alias -g CC="| xclip -selection clipboard" ## networking alias pubip="curl ipinfo.io" alias netCons="lsof -i" alias tulp="ss -tulp" alias openPorts="sudo lsof -i | grep LISTEN" alias pong="ping -c 3 www.google.com" alias lsock="sudo lsof -i -P" alias lsockU="sudo lsof -nP | grep UDP" alias lsockT="sudo lsof -nP | grep TCP" ## logs directory alias lslog="ls /var/log/" ## reboot/poweroff alias rbt="sudo systemctl reboot" alias shut="sudo systemctl poweroff"