#alias:new mdig e:dig fn mdig [@_args]{ if (== (count $_args) 0) { fail (styled "Veuillez saisir au moins un nom de domaineā€¦" bold red) } ns = [] @hosts = $@_args if (has-prefix $_args[0] '@') { ns = $_args[0] @hosts = (drop 1 $hosts) } if (== (count $hosts) 0) { fail (styled "Veuillez saisir au moins un nom de domaineā€¦" bold red) } for h $hosts { @ipv4 = (e:dig $ns $h A +short) @ipv6 = (e:dig $ns $h AAAA +short) if (== (count $ipv4) 0) { @ipv4 = "" } if (== (count $ipv6) 0) { @ipv6 = "" } echo (styled $h bold yellow) echo (styled 'A ' bright-red)$@ipv4 echo (styled 'AAAA ' bright-red)$@ipv6 echo "----------------------" } }