From 4170890f545106bfaf24b49e17c9fad80761a0f7 Mon Sep 17 00:00:00 2001 From: Benjamin VAUDOUR Date: Wed, 1 Sep 2021 15:55:25 +0200 Subject: [PATCH] Corrections diverses --- aliases/aliases.elv | 2 +- aliases/ipof.elv | 14 +++++++------- rc.elv | 1 + 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/aliases/aliases.elv b/aliases/aliases.elv index 5c36e35..32a07b7 100644 --- a/aliases/aliases.elv +++ b/aliases/aliases.elv @@ -4,7 +4,7 @@ edit:add-var curl~ $e:curlie~ edit:add-var df~ $e:duf~ edit:add-var diff~ $e:colordiff~ edit:add-var dig~ [@argv]{ e:dig +noall +answer $@argv } -edit:add-var dogall~ [@argv]{ e:dog A AAAA CNAME $@argv } +edit:add-var dogall~ [@argv]{ e:dog A AAAA CNAME PTR TXT MX SRV NS SOA $@argv } edit:add-var du~ [@argv]{ e:du -h $@argv } edit:add-var git~ $e:hub~ edit:add-var grep~ [@argv]{ e:grep --color=tty -d skip $@argv } diff --git a/aliases/ipof.elv b/aliases/ipof.elv index e8c2162..845ac99 100644 --- a/aliases/ipof.elv +++ b/aliases/ipof.elv @@ -26,21 +26,21 @@ edit:add-var ipof~ [@argv]{ &txt='' ] e:dnscrypt-proxy -config /etc/dnscrypt-proxy/dnscrypt-proxy.toml -resolve (idn -a $d) | peach [l]{ - var l = $l - var idx = (+ (str:index $l :) 1) - var value = (str:trim-space $l[$idx".."]) - if (or (str:has-prefix $l 'IPv4 addresses') (str:has-prefix $l 'IPv6 addresses')) { + var ll = $l + var idx = (+ (str:index $ll :) 1) + var value = (str:trim-space $ll[$idx".."]) + if (or (str:has-prefix $ll 'IPv4 addresses') (str:has-prefix $ll 'IPv6 addresses')) { str:split ', ' $value | peach [e]{ var ee = $e if (ip:is-ip $ee) { result[ips][$ee] = $nil } } - } elif (str:has-prefix $l 'TXT records') { + } elif (str:has-prefix $ll 'TXT records') { result[txt] = $value - } elif (str:has-prefix $l 'Resolver') { + } elif (str:has-prefix $ll 'Resolver') { result[resolvers] = $value - } elif (str:has-prefix $l 'Name servers') { + } elif (str:has-prefix $ll 'Name servers') { result[remote] = (not-eq $value 'name does not exist') } } diff --git a/rc.elv b/rc.elv index 44cda30..aa27a68 100644 --- a/rc.elv +++ b/rc.elv @@ -1,3 +1,4 @@ +#set-env BAT_THEME Coldark-Cold set-env BAT_PAGER 'less -RF' set-env EDITOR vim set-env VIEW 'vim -R'