weaver
weaver copied to clipboard
Added `weaver completion` bash completion command.
This PR introduces a weaver completion command that spits out a bash completion script that enables tab completion for the weaver command. For example:
$ weaver <tab><tab>
generate gke gke-local multi single ssh version
$ weaver single <tab><tab>
dashboard deploy help metrics profile purge status version
$ weaver single p<tab><tab>
profile purge
To enable the tab completion, you run source <(weaver completion). This mirrors kubectl completion bash. Source the file in your ~/.bashrc if you always want it to be enabled.
I added weaver completion selfishly, as I thought it was useful. If others find it useful, we can advertise it to users. There is a bit of overhead in updating it whenever commands change, and the gke commands could be stale, so it would require work to be more robust. Also happy to leave this out of the repo and have it privately for myself.