# Aliases shared by every machine. # # Each one that depends on a command is guarded by whether that command exists. # Without the guard, "alias ls='lsd'" turns ls into a broken command on any # machine where lsd is not installed - the Mac, for one - and breaking ls is # the sort of thing that makes a shared dotfile repository feel like a mistake. alias vi="nvim" alias ducks="du -cksh * | sort -rn | head" if (( $+commands[lsd] )); then alias ls='lsd' alias l='lsd -l' alias la='lsd -a' alias lla='lsd -la' alias lt='lsd --tree' fi # Arch only. Present on beastix and shron, absent on the Mac. (( $+commands[yay] )) && \ alias update='yay -Syu --devel --noconfirm --diffmenu=false --cleanmenu=false --editmenu=false --answerupgrade None' # kitty's ssh wrapper, which carries the terminfo across. Falls back to nothing # rather than shadowing ssh with something that is not there. (( $+commands[kitten] )) && alias s="kitten ssh"