diff --git a/configs/.zshrc b/configs/.zshrc index d4b2636..5397d60 100644 --- a/configs/.zshrc +++ b/configs/.zshrc @@ -112,6 +112,9 @@ alias genuuid="python -c 'import uuid; print(uuid.uuid4())'" alias nvim-tmp="$EDITOR $(mktemp)" alias vim-tmp="$EDITOR $(mktemp)" +# If this is macos, alias `mtr` to `sudo mtr` (if mtr exists) +[[ $(uname -s) == "Darwin" ]] && [[ -x "$(command -v mtr)" ]] && alias mtr="sudo mtr" + # Some aliases only make sense if their parent command exists [[ -x "$(command -v wg)" ]] && alias wg-easykeys="wg genkey | tee >(wg pubkey)" [[ -x "$(command -v systemd-resolve)" ]] && alias flush-dns="sudo systemd-resolve --flush-caches"