From b3c3c82e49aa01d615df179dde4fad75b8644618 Mon Sep 17 00:00:00 2001 From: John D Pell Date: Tue, 12 Oct 2021 12:27:24 -0700 Subject: [PATCH] completions/sqlmap: use `_command_exists` Addresses bash-it/bash-it#1632 --- completion/available/sqlmap.completion.bash | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/completion/available/sqlmap.completion.bash b/completion/available/sqlmap.completion.bash index 213dd81736..af3b4f465d 100644 --- a/completion/available/sqlmap.completion.bash +++ b/completion/available/sqlmap.completion.bash @@ -79,7 +79,7 @@ then ;; esac - if [[ "$cur" == * ]]; then + if [[ "$cur" == * ]]; then COMPREPLY=( $( compgen -W '-h --help -hh --version -v -d -u --url -l -x -m -r -g -c --method \ --data --param-del --cookie --cookie-del --load-cookies \ --drop-set-cookie --user-agent --random-agent --host --referer \ @@ -145,8 +145,7 @@ then --sqlmap-shell --wizard ' COMPREPLY=( $( \ (while read -d ' ' i; do - [[ -z "$i" || "${onlyonce/ ${i%% *} / }" == "$onlyonce" ]] && - continue + [[ -z "$i" || "${onlyonce/ ${i%% *} / }" == "$onlyonce" ]] && continue # flatten array with spaces on either side, # otherwise we cannot grep on word boundaries of # first and last word