From 0007fc4c5d4ff43158c0c13cb1e4750ce2285b67 Mon Sep 17 00:00:00 2001 From: xeruf <27jf@pm.me> Date: Sat, 10 Sep 2022 19:02:14 +0200 Subject: [PATCH] config/shell/functions: enable dns on dig-systems --- .config/shell/functions | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.config/shell/functions b/.config/shell/functions index 4b416c7..f4ff18c 100644 --- a/.config/shell/functions +++ b/.config/shell/functions @@ -268,10 +268,11 @@ u() { # Networking dns() { + local dig="$(which drill || echo "dig +short")" # TODO implement rdns via -x for arg; do - drill A @8.8.8.8 -Q "${arg##*/}" - drill AAAA @8.8.8.8 -Q "${arg##*/}" + $dig A @8.8.8.8 -Q "${arg##*/}" + $dig AAAA @8.8.8.8 -Q "${arg##*/}" done } alias sshk="$(case $TERM in (*-kitty) echo 'TERM=xterm-256color kitty +kitten';; esac) ssh"