mirror of
https://codeberg.org/hyperreal/dotfiles
synced 2024-11-25 11:53:43 +01:00
77 lines
1.8 KiB
Bash
77 lines
1.8 KiB
Bash
#!/usr/bin/env zsh
|
|
##############################################################################
|
|
# vim:set ft=zsh ai et sw=4 ts=4:
|
|
#
|
|
# @author : Jeffrey Serio <hyperreal@unixcat.coffee>
|
|
# @file : aliases.zsh
|
|
# @load_order : post-zshrc
|
|
|
|
|
|
## 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 ; }
|
|
|
|
## open zshrc in EDITOR
|
|
alias zshrc="${=EDITOR} ${HOME}/.zshrc"
|
|
|
|
## 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 -p"
|
|
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"
|
|
|
|
alias lslog="ls /var/log/"
|
|
|
|
## reboot/poweroff
|
|
alias rbt="sudo shutdown -r now"
|
|
alias shut="sudo shutdown now"
|
|
|