wadm comes with an auto completor for commands in shell mode. But for running wadm commands in single mode, you need to be aware of the command name and usage.
For those who don't know, bash has a feature called programmable auto completion ('man bash' for more info). What it means is that you can add your own rules for completing custom commands.
Just follow these steps to set up wadm (which I did on my Ubuntu):
1. Create /etc/bash_completion.d if it doesn't already exist.
2. Save this script as wadm in /etc/bash_completion.d
3. Save this commands and options file as wadm_commands.txt in /etc/bash_completion.d
4. Source the script into your shell and start tabbing!
| $
cd <install-root>/bin $ source /etc/bash_completion.d/wadm $ wadm l[TAB]ist-[TAB][TAB] list-acls list-error-pages list-mail-resources list-auth-realm-userprops list-events list-mime-types list-auth-realms list-external-jndi-resource-userprops list-nodes list-authdb-userprops list-external-jndi-resources list-org-units list-authdbs list-group-members list-reverse-proxy-headers list-certs list-groups list-reverse-proxy-uris list-cgi-dirs list-http-listeners list-search-collections list-cgi-envvars list-instances list-soap-auth-provider-userprops list-ciphers list-jdbc-resource-userprops list-soap-auth-providers list-config-files list-jdbc-resources list-tokens list-configs list-jvm-options list-uri-patterns list-crls list-jvm-profilers list-url-redirects list-custom-resource-userprops list-lifecycle-module-userprops list-users list-custom-resources list-lifecycle-modules list-virtual-servers list-dav-collections list-locks list-webapps list-document-dirs list-mail-resource-userprops bash-3.00$ wadm list-n[TAB]odes [TAB]--[TAB][TAB] --all --host --no-ssl --port --user --echo --no-prompt --password-file --rcfile --verbose |
As an added tip, I have the following setting in ~/.inputrc file which enables auto completion on single [TAB] key press. Double tab press is the default intended behaviour.
| $
cat ~/.inputrc set show-all-if-ambiguous on |
Posted by Kedar Mhaswade on December 13, 2006 at 11:41 AM IST #