Skip to content

Commit 002a23c

Browse files
author
Noah Gorny
authored
Merge pull request #1961 from gaelicWizard/completion-wpscan
completion/wpscan: simplify code flow (whitespace)
2 parents 3757755 + 84c9666 commit 002a23c

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed
Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
# shellcheck shell=bash
22

3-
if _command_exists wpscan; then
4-
function __wpscan_completion() {
5-
local OPTS=("--help --hh --version --url --ignore-main-redirect --verbose --output --format --detection-mode --scope --headers --user-agent --vhost --random-user-agent --user-agents-list --http-auth --max-threads --throttle --request-timeout --connect-timeout --disable-tlc-checks --proxy --proxy-auth --cookie-string --cookie-jar --cache-ttl --clear-cache --server --cache-dir --update --no-update --wp-content-dir --wp-plugins-dir --wp-version-detection --main-theme-detection --enumerate --exclude-content-based --plugins-list --plugins-detection --plugins-version-all --plugins-version-detection --themes-list --themes-detection --themes-version-all --themes-version-detection --timthumbs-list --timthumbs-detection --config-backups-list --config-backups-detection --db-exports-list --db-exports-detection --medias-detection --users-list --users-detection --passwords --usernames --multicall-max-passwords --password-attack --stealthy")
6-
COMPREPLY=()
7-
for _opt_ in "${OPTS[@]}"; do
8-
if [[ "$_opt_" == "$2"* ]]; then
9-
COMPREPLY+=("$_opt_")
10-
fi
11-
done
12-
}
3+
_command_exists wpscan || return
134

14-
complete -F __wpscan_completion wpscan
15-
fi
5+
function __wpscan_completion() {
6+
local _opt_
7+
local OPTS=('--help' '--hh' '--version' '--url' '--ignore-main-redirect' '--verbose' '--output' '--format' '--detection-mode' '--scope' '--headers' '--user-agent' '--vhost' '--random-user-agent' '--user-agents-list' '--http-auth' '--max-threads' '--throttle' '--request-timeout' '--connect-timeout' '--disable-tlc-checks' '--proxy' '--proxy-auth' '--cookie-string' '--cookie-jar' '--cache-ttl' '--clear-cache' '--server' '--cache-dir' '--update' '--no-update' '--wp-content-dir' '--wp-plugins-dir' '--wp-version-detection' '--main-theme-detection' '--enumerate' '--exclude-content-based' '--plugins-list' '--plugins-detection' '--plugins-version-all' '--plugins-version-detection' '--themes-list' '--themes-detection' '--themes-version-all' '--themes-version-detection' '--timthumbs-list' '--timthumbs-detection' '--config-backups-list' '--config-backups-detection' '--db-exports-list' '--db-exports-detection' '--medias-detection' '--users-list' '--users-detection' '--passwords' '--usernames' '--multicall-max-passwords' '--password-attack' '--stealthy')
8+
COMPREPLY=()
9+
for _opt_ in "${OPTS[@]}"; do
10+
if [[ "$_opt_" == "$2"* ]]; then
11+
COMPREPLY+=("$_opt_")
12+
fi
13+
done
14+
}
15+
16+
complete -F __wpscan_completion wpscan

0 commit comments

Comments
 (0)