Comments (2)
Auto-complete is implemented specifically for bash at present (though the Python script that backs it is portable).
This can be used directly in zsh as well by running the following before sourcing the bash completion file:
autoload -Uz +X compinit && compinit
autoload -Uz +X bashcompinit && bashcompinit
from wordfence-cli.
v2.1.0-rc2 11/27/23
SUMMARY:
QA validation PASSED. Auto-completion works for me after testing on a couple of different environments. I tested primarily with bash and briefly with zsh. Either seems to work as expected.
VALIDATION STEPS
- Source the scripts/complete.bash file (such as by cloning the project or just by downloading this file).
- Ensure that auto-complete works as expected for all the subcommands and args - I spot checked many of them but not every single one. When I would partially type a subcommand and then a
-
for an arg and then<TAB><TAB>
to list all, then all args were printed from what I can tell, so everything should be good to go. - Test with each
bash
andzsh
, note the extra steps for zsh Alex mentioned in this issue.
NOTES:
Example of ` autocomplete results for each subcommand
david@ubuntu2204:~$ source wordfence-cli/scripts/complete.bash
david@ubuntu2204:~$ wordfence vuln-scan -
--accept-terms -E -l --no-debug --output --quiet --smtp-user
--banner --email -L --no-help --output-columns --read-stdin -t
-c --email-from --license --no-informational --output-format --relative-content-path --theme-directory
-C --exclude-vulnerability --log-level --no-output --output-headers --relative-mu-plugins-path -v
--cache -f -m --no-output-headers --output-path --relative-plugins-path --verbose
--cache-directory --feed -M --no-prefix-log-levels -p --require-path --version
--check-for-update -h --no-accept-terms --no-purge-cache -P -s -w
--color --help --no-banner --no-quiet --path-separator --sendmail-path --wfi-url
--configuration -i --noc1-url --no-read-stdin --plugin-directory --smtp-host --wordpress-path
-d -I --no-cache --no-require-path --prefix-log-levels --smtp-password
--debug --include-vulnerability --no-check-for-update --no-verbose --purge-cache --smtp-port
-e --informational --no-color --no-version -q --smtp-tls-mode
david@ubuntu2204:~$ wordfence malware-scan -
-a --debug --images -n --no-include-all-files --output-columns -s --wfi-url
--accept-terms -e --include-all-files -N --no-match-all --output-format --scanned-content-limit --workers
--allow-io-errors -E --include-files --no-accept-terms --no-output --output-headers --sendmail-path -x
--banner --email --include-files-pattern --no-allow-io-errors --no-output-headers --output-path --smtp-host -X
-c --email-from --include-signatures --no-banner --no-prefix-log-levels --pcre-backtrack-limit --smtp-password -z
--cache --exclude-files -l --noc1-url --no-progress --pcre-recursion-limit --smtp-port
--cache-directory --exclude-files-pattern -L --no-cache --no-purge-cache --prefix-log-levels --smtp-tls-mode
--check-for-update --exclude-signatures --license --no-check-for-update --no-quiet --progress --smtp-user
--chunk-size --file-list-separator --log-level --no-color --no-read-stdin --purge-cache -v
--color -h -m --no-debug --no-verbose -q --verbose
--configuration --help -M --no-help --no-version --quiet --version
-d -i --match-all --no-images --output --read-stdin -w
david@ubuntu2204:~$ wordfence configure -
--accept-terms -d --help --no-cache --no-purge-cache --purge-cache --smtp-port --workers
--banner -D -l --no-check-for-update --no-quiet -q --smtp-tls-mode
-c --debug -L --no-color --no-request-license --quiet --smtp-user
--cache --default --license --no-debug --no-verbose -r -v
--cache-directory -E --log-level --no-default --no-version --request-license --verbose
--check-for-update --email --no-accept-terms --no-help -o --sendmail-path --version
--color --email-from --no-banner --no-overwrite --overwrite --smtp-host -w
--configuration -h --noc1-url --no-prefix-log-levels --prefix-log-levels --smtp-password --wfi-url
david@ubuntu2204:~$ wordfence terms -
--accept-terms --color --email-from --log-level --no-color --no-verbose --sendmail-path -v
--banner --configuration -h --no-accept-terms --no-debug --no-version --smtp-host --verbose
-c -d --help --no-banner --no-help --prefix-log-levels --smtp-password --version
--cache --debug -l --noc1-url --no-prefix-log-levels --purge-cache --smtp-port --wfi-url
--cache-directory -E -L --no-cache --no-purge-cache -q --smtp-tls-mode
--check-for-update --email --license --no-check-for-update --no-quiet --quiet --smtp-user
david@ubuntu2204:~$ wordfence help -
--accept-terms --color --email-from --log-level --no-color --no-verbose --sendmail-path -v
--banner --configuration -h --no-accept-terms --no-debug --no-version --smtp-host --verbose
-c -d --help --no-banner --no-help --prefix-log-levels --smtp-password --version
--cache --debug -l --noc1-url --no-prefix-log-levels --purge-cache --smtp-port --wfi-url
--cache-directory -E -L --no-cache --no-purge-cache -q --smtp-tls-mode
--check-for-update --email --license --no-check-for-update --no-quiet --quiet --smtp-user
david@ubuntu2204:~$ wordfence version -
--accept-terms --color --email-from --log-level --no-color --no-verbose --sendmail-path -v
--banner --configuration -h --no-accept-terms --no-debug --no-version --smtp-host --verbose
-c -d --help --no-banner --no-help --prefix-log-levels --smtp-password --version
--cache --debug -l --noc1-url --no-prefix-log-levels --purge-cache --smtp-port --wfi-url
--cache-directory -E -L --no-cache --no-purge-cache -q --smtp-tls-mode
--check-for-update --email --license --no-check-for-update --no-quiet --quiet --smtp-user
Tested primarily on amd64 Ubuntu 22.04.3 with GNU bash 5.1.16, and zsh 5.8.1 -- both were provided by default ubuntu repos.
from wordfence-cli.
Related Issues (20)
- Result queue can fill up causing malware scans to hang
- Feature: First Scan, Incremental Scan and On-demand Scan HOT 2
- Input from stdin isn't processed until an entire chunk is available HOT 1
- New Wordfence CLI install produces "Latin-1" UnicodeEncodeError HOT 11
- CLI misses malware reported by plugin HOT 2
- Implement vectorscan support to improve malware scan performance HOT 9
- On MacOS, when you remediate one or more files and enable debug logging, FileType.<TYPE> is output HOT 1
- Feature Request: Add argument to skip api.github.com version check HOT 2
- Inconsistent exit code with remediate depending on if install via pip or binary HOT 2
- Missing RPM from the crb repo HOT 2
- Add public contribution and security guidelines
- Add option to limit CPU usage for malware scans
- Non-ASCII characters in filenames can result in encoding errors HOT 9
- Error: 'bytes' object has no attribute 'encode' HOT 7
- Error: 'utf-8' codec can't decode byte 0xfc in position 62: invalid start byte HOT 7
- File name filtering error HOT 1
- Document `--email` file attachment capability HOT 3
- Remove version number from tracked file
- Use a specific/identifiable user agent when making requests to Wordfence APIs
- Gracefully handle rate-limited responses from the Wordfence APIs
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wordfence-cli.