From cd2469b59ffc3b983a3e87a97c922380277c9205 Mon Sep 17 00:00:00 2001 From: Gurkirat Singh Date: Mon, 28 Dec 2020 00:25:54 +0530 Subject: [PATCH] fixed linting issue --- completion/available/vuejs.completion.bash | 10 ++-- completion/available/wpscan.completion.bash | 54 ++++++++++----------- 2 files changed, 32 insertions(+), 32 deletions(-) diff --git a/completion/available/vuejs.completion.bash b/completion/available/vuejs.completion.bash index 25d463ae..6395d4e0 100644 --- a/completion/available/vuejs.completion.bash +++ b/completion/available/vuejs.completion.bash @@ -1,15 +1,15 @@ #!/usr/bin/bash if command -v vue > /dev/null; then - __vuejs_completion() { - local OPTS=("--version --help create add invoke inspect serve build ui init config outdated upgrade migrate info") + __vuejs_completion() { + local OPTS=("--version --help create add invoke inspect serve build ui init config outdated upgrade migrate info") COMPREPLY=() - for _opt_ in "${OPTS[@]}"; do - if [[ "$_opt_" == "$2"* ]]; then + for _opt_ in "${OPTS[@]}"; do + if [[ "$_opt_" == "$2"* ]]; then COMPREPLY+=("$_opt_") fi done } - complete -F __vuejs_completion vue + complete -F __vuejs_completion vue fi diff --git a/completion/available/wpscan.completion.bash b/completion/available/wpscan.completion.bash index 3020ca6a..91eb117b 100644 --- a/completion/available/wpscan.completion.bash +++ b/completion/available/wpscan.completion.bash @@ -2,54 +2,54 @@ if command -v wpscan > /dev/null; then - _wpscan() { + _wpscan() { - local cur prev + local cur prev COMREPLY=() - cur=$( _get_cword) - prev=$( _get_pword) + cur=$( _get_cword) + prev=$( _get_pword) - local SINGLES=$(compgen -W "-h -v -f -o -t -e -U -P") - local DOUBLES=$(compgen -W "--url --help --hh --version --ignore-main-redirect --banner --no-banner --max-scan-duration --format --output --detection-mode --user-agent --ua --http-auth --max-threads --throttle --request-timeout --connect-timeout --disable-tls-checks --proxy --proxy-auth --cookie-string --cookie-jar --force --update --no-update --api-token --wp-content-dir --wp-plugins-dir --enumerate --exclude-content-based --plugins-list --plugins-detection --plugins-version-all --plugins-version-detection --plugins-threshold --themes-list --themes-detection --themes-version-all --themes-version-detection --themes-threshold --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 --login-uri --stealthy --random-user-agent") - local OPTS=("${SINGLES[@]}" "${DOUBLES[@]}") + local SINGLES=$(compgen -W "-h -v -f -o -t -e -U -P") + local DOUBLES=$(compgen -W "--url --help --hh --version --ignore-main-redirect --banner --no-banner --max-scan-duration --format --output --detection-mode --user-agent --ua --http-auth --max-threads --throttle --request-timeout --connect-timeout --disable-tls-checks --proxy --proxy-auth --cookie-string --cookie-jar --force --update --no-update --api-token --wp-content-dir --wp-plugins-dir --enumerate --exclude-content-based --plugins-list --plugins-detection --plugins-version-all --plugins-version-detection --plugins-threshold --themes-list --themes-detection --themes-version-all --themes-version-detection --themes-threshold --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 --login-uri --stealthy --random-user-agent") + local OPTS=("${SINGLES[@]}" "${DOUBLES[@]}") - local DETECTION="mixed active passive" + local DETECTION="mixed active passive" case $prev in - --format | -f) - COMPREPLY=($( compgen -W "cli cli-no-color json" -- "$cur")) - return 0 + --format | -f) + COMPREPLY=("$( compgen -W "cli cli-no-color json" -- "$cur")") + return 0 ;; - --detection-mode | *detection) - COMPREPLY=($( compgen -W "$DETECTION" -- "$cur")) - return 0 + --detection-mode | *detection) + COMPREPLY=("$( compgen -W "$DETECTION" -- "$cur")") + return 0 ;; - --enumerate | -e) + --enumerate | -e) case $prev in - vp | ap | p) - COMPREPLY=($( compgen -W "vt at t tt cb dbe u m" -- "$cur")) - return 0 + vp | ap | p) + COMPREPLY=("$( compgen -W "vt at t tt cb dbe u m" -- "$cur")") + return 0 ;; - vt | at | t) - COMPREPLY=($( compgen -W "vp ap p tt cb dbe u m" -- "$cur")) - return 0 + vt | at | t) + COMPREPLY=("$( compgen -W "vp ap p tt cb dbe u m" -- "$cur")") + return 0 ;; *) - COMPREPLY=($( compgen -W "vp ap p vt at t tt cb dbe u m" -- "$cur")) - return 0 + COMPREPLY=("$( compgen -W "vp ap p vt at t tt cb dbe u m" -- "$cur")") + return 0 ;; esac ;; --password-attack) - COMPREPLY=($( compgen -W "wp-login xmlrpc xmlrpc-multicall" -- "$cur")) + COMPREPLY=("$( compgen -W "wp-login xmlrpc xmlrpc-multicall" -- "$cur")") ;; ## HANDLE ALL OTHER *) - for OPT in "${OPTS[@]}"; do - if [[ "$OPT" == "$2"* ]]; then + for OPT in "${OPTS[@]}"; do + if [[ "$OPT" == "$2"* ]]; then COMPREPLY+=("$OPT") fi done @@ -58,5 +58,5 @@ if command -v wpscan > /dev/null; then esac } - complete -F _wpscan wpscan + complete -F _wpscan wpscan fi