2 ms·
i use zsh on macos so what follows might not work for everyone my favorite aliases # show the local Makefile targets alias targets="grep '^[^#[:space:
by GhostWhisperer 3y ago
i use zsh on macos so what follows might not work for everyone
my favorite aliases
# show the local Makefile targets
alias targets="grep '^[^#[:space:]\.].*:' Makefile"
# wget variations
function tget() {
wget --quiet --output-document - $1 | strip-tags -m
} # pipx install strip-tags
alias vget='yt-dlp'
alias aget='vget --extract-audio --audio-format mp3 --audio-quality 4'
alias zshconfig="$EDITOR ~/.zshrc && reload"
alias gitconfig="$EDITOR ~/.gitconfig"
alias sshconfig="$EDITOR ~/.ssh/config"
alias brewconfig="$EDITOR ~/Brewfile && brewup"
alias brewup='brew bundle --file=~/Brewfile --quiet && brew update && brew upgrade'
aliases are cool but in zsh there's the concept of global aliases
alias -g H=' | head'
makes
wget -qO example.com H
equivalent to
wget -qO example.com | head
the ones i use the most are
alias -g H=' | head'
alias -g T=' | tail'
alias -g G=' | grep -i'
alias -g C=' | pbcopy'
alias -g XI=' | xargs -I _'
i also use starship for my prompt which gives me a lot of information about where i'm at and what's available in $PWD, but on top of that i also set the `chpwd` function to list the last five modified items