Skip to content

Commit

Permalink
completions/sqlmap: use _command_exists
Browse files Browse the repository at this point in the history
Addresses Bash-it#1632
  • Loading branch information
gaelicWizard committed Mar 4, 2022
1 parent 0f3ddba commit a762a16
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions completion/available/sqlmap.completion.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit a762a16

Please sign in to comment.