From 605c048fc76c338c44818bf0d9db2c5a326cd9b9 Mon Sep 17 00:00:00 2001 From: Aaron Gyes Date: Sat, 27 Nov 2021 15:21:49 -0800 Subject: [PATCH] add dscacheutil completions this is the thing you use on macos to reset the DNS cache. --- share/completions/dscacheutil.fish | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 share/completions/dscacheutil.fish diff --git a/share/completions/dscacheutil.fish b/share/completions/dscacheutil.fish new file mode 100644 index 000000000..85819bee2 --- /dev/null +++ b/share/completions/dscacheutil.fish @@ -0,0 +1,27 @@ +# dscacheutil +complete -c dscacheutil -f -d 'Directory Service cache utility' +complete -c dscacheutil -s h -d 'lists options' -f -n '[ (commandline -opc | count) -le 1 ]' +complete -c dscacheutil -s q -d 'initiate query' -f -x -n '[ (commandline -opc | count) -le 1 ] || contains -- -a (commandline -opc) || contains -- -q (commandline -opc) && [ (commandline -opc | count) -lt 3 ]' -a " +group\t'name or gid' +host\t'name or ip address' +mount\t'name' +protocol\t'name or number' +rpc\t'name or number' +service\t'name or port' +user\t'name or uid' +" +complete -c dscacheutil -s a -d '-q: specific key & value' -f -n 'contains -- -q (commandline -opc)' +complete -c dscacheutil -o cachedump -d 'dump cache overview' -f -n '[ (commandline -opc | count) -le 1 ]' +complete -c dscacheutil -o buckets -d 'show hash buckets' -f -n 'contains -- -cachedump (commandline -opc)' +complete -c dscacheutil -o entries -d '-cachedump: cache entries' -f -n 'contains -- -cachedump (commandline -opc)' -a " +group\t'name or gid' +host\t'name or ip address' +mount\t'name' +protocol\t'name or number' +rpc\t'name or number' +service\t'name or port' +user\t'name or uid' +" +complete -c dscacheutil -o configuration -d 'print current config' -f -n '[ (commandline -opc | count) -le 1 ]' +complete -c dscacheutil -o statistics -d 'prints cache stats' -f -n '[ (commandline -opc | count) -le 1 ]' +complete -c dscacheutil -o flushcache -d 'reset cache (DNS )' -f -k -n '[ (commandline -opc | count) -le 1 ]'