Merge c4e4846ae5 into e38696a0ac
commit
84c9b07e99
|
|
@ -7,11 +7,9 @@
|
||||||
# |
|
# |
|
||||||
# ---------------------------------------------------------------------------+
|
# ---------------------------------------------------------------------------+
|
||||||
|
|
||||||
if _command_exists sqlmap
|
_command_exists sqlmap || return
|
||||||
then
|
|
||||||
|
|
||||||
function _sqlmap()
|
function _sqlmap() {
|
||||||
{
|
|
||||||
local cur prev
|
local cur prev
|
||||||
|
|
||||||
COMPREPLY=()
|
COMPREPLY=()
|
||||||
|
|
@ -143,10 +141,10 @@ then
|
||||||
--dependencies --disable-coloring --identify-waf \
|
--dependencies --disable-coloring --identify-waf \
|
||||||
--mobile --page-rank --purge-output --smart \
|
--mobile --page-rank --purge-output --smart \
|
||||||
--sqlmap-shell --wizard '
|
--sqlmap-shell --wizard '
|
||||||
COMPREPLY=( $( \
|
COMPREPLY=($(
|
||||||
(while read -d ' ' i; do
|
(
|
||||||
[[ -z "$i" || "${onlyonce/ ${i%% *} / }" == "$onlyonce" ]] &&
|
while read -d ' ' i; do
|
||||||
continue
|
[[ -z "$i" || "${onlyonce/ ${i%% *} / }" == "$onlyonce" ]] && continue
|
||||||
# flatten array with spaces on either side,
|
# flatten array with spaces on either side,
|
||||||
# otherwise we cannot grep on word boundaries of
|
# otherwise we cannot grep on word boundaries of
|
||||||
# first and last word
|
# first and last word
|
||||||
|
|
@ -154,7 +152,8 @@ then
|
||||||
# remove word from list of completions
|
# remove word from list of completions
|
||||||
COMPREPLY=(${COMPREPLY/ ${i%% *} / })
|
COMPREPLY=(${COMPREPLY/ ${i%% *} / })
|
||||||
done
|
done
|
||||||
printf '%s ' "${COMPREPLY[@]}") <<<"${COMP_WORDS[@]}"
|
printf '%s ' "${COMPREPLY[@]}"
|
||||||
|
) <<< "${COMP_WORDS[@]}"
|
||||||
))
|
))
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
@ -162,7 +161,4 @@ then
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
complete -F _sqlmap sqlmap
|
complete -F _sqlmap sqlmap
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue