pull/1962/merge
John D Pell 2023-07-22 14:31:54 +08:00 committed by GitHub
commit 84c9b07e99
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 148 additions and 152 deletions

View File

@ -7,11 +7,9 @@
# |
# ---------------------------------------------------------------------------+
if _command_exists sqlmap
then
_command_exists sqlmap || return
function _sqlmap()
{
function _sqlmap() {
local cur prev
COMPREPLY=()
@ -143,10 +141,10 @@ then
--dependencies --disable-coloring --identify-waf \
--mobile --page-rank --purge-output --smart \
--sqlmap-shell --wizard '
COMPREPLY=( $( \
(while read -d ' ' i; do
[[ -z "$i" || "${onlyonce/ ${i%% *} / }" == "$onlyonce" ]] &&
continue
COMPREPLY=($(
(
while read -d ' ' i; do
[[ -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
@ -154,7 +152,8 @@ then
# remove word from list of completions
COMPREPLY=(${COMPREPLY/ ${i%% *} / })
done
printf '%s ' "${COMPREPLY[@]}") <<<"${COMP_WORDS[@]}"
printf '%s ' "${COMPREPLY[@]}"
) <<< "${COMP_WORDS[@]}"
))
#else
@ -162,7 +161,4 @@ then
fi
}
complete -F _sqlmap sqlmap
fi