From 54b30fb6146bf2431157e7be6715d93378db6e8f Mon Sep 17 00:00:00 2001 From: Evan Pratten Date: Mon, 14 Nov 2022 20:33:43 -0500 Subject: [PATCH] dns macro --- configs/zsh/macros.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/configs/zsh/macros.sh b/configs/zsh/macros.sh index 29e5f32..2485da9 100644 --- a/configs/zsh/macros.sh +++ b/configs/zsh/macros.sh @@ -4,11 +4,10 @@ alias la="ls -a" alias :q="exit" alias :wq="exit" alias cls=clear -alias p4='ping 8.8.8.8 -c 4' -alias quickhttp='sudo python -m SimpleHTTPServer 443' alias zshreload="source ~/.zshrc" alias wg-easykeys="wg genkey | tee >(wg pubkey)" alias nvim-tmp="nvim $(mktemp)" +alias flush-dns="sudo systemd-resolve --flush-caches" # WHOIS macros alias whois-afrinic="whois -h whois.afrinic.net" @@ -33,7 +32,11 @@ alias whois-ripe="whois -h whois.ripe.net" # Kill via pgrep nkill() { - kill -9 $(pgrep $1) + if [ $# != 1 ]; then + echo "Usage: nkill " + else + kill -9 $(pgrep $1) + fi } # Makes a directory, then moves into it