completion nmap: suppress warning when local scripts folder exists

This commit is contained in:
exploide 2021-07-30 17:32:39 +02:00 committed by Fabian Homborg
parent 80888eed57
commit ac81d370cd

View file

@ -76,7 +76,7 @@ function __fish_complete_nmap_script
set -g __fish_nmap_script_completion_cache_time (date +"%s")
set -g __fish_nmap_script_completion_cache ""
set -l cmd
for l in (nmap --script-help all|grep -A2 -B1 Categories:|grep -v '^\\(--\\|Categories:\\|https:\\)')
for l in (nmap --script-help all 2> /dev/null | grep -A2 -B1 Categories: | grep -v '^\\(--\\|Categories:\\|https:\\)')
if string match -q -v --regex "^ " $l
set cmd $l
else