VCS Bash completion - Bash Completion for VCS CLI
Please Note: This is an early beta and comes WITHOUT ANY WARRANTY. This should not be installed on production machines.
This is an early beta of adding bash completion to VCS HA commands.
We would like to get feedback from the user community about this utility.
Adding bash completion support for ha commands makes them more user friendly.
The examples below show how bash completion for ha commands would work:
1. hagrp -of[TAB] would complete to hagrp -offline
2. hagrp -offline -f[TAB] would complete to hagrp -offline -force
3. But hagrp -fo[TAB] will not complete (since there is no hagrp -force major option)
4. hagrp -offline -force gr[TAB] would list all the groups starting from gr, allowing the user to identify & select the correct one.
At every stage [TAB] completion would show the user a list of valid inputs at that context.
Thus the user no longer has to remember the exact command line syntax or even the object names.
As long as the user follows [TAB] completion, he would get the correct command line.
To auto complete object & attribute names, we will pre-fetch these and store in metadata files within the user's home directory.
We have provided a hasync utility for this.
Whenever the config changes, the user can fire hasync to get the updated metadata from had. Or hasync can be added to cron for periodic refresh.
SUPPORTED HA COMMANDS:
Support for other commands would be added later.
This has been tested using VCS 5.1 ha commands on RHEL 5.