pulsar
pulsar copied to clipboard
[improve][cli] Add generate-completion command to admin and client
Motivation
The tab-completion is an important feature, we have migrated the CLI parser to picocli from jcommander, right now we can use the picocli autocomplete to do that.
- pulsar-admin
❯ source <(bin/pulsar-admin generate-completion)
❯ bin/pulsar-admin topics clear-backlog --subscription
--help --subscription --version -h -s -v
- pulsar-client
❯ source <(bin/pulsar-client generate-completion)
❯ bin/pulsar-client produce -h
--chunking --files --key-value-key --rate -db -h -kvkf -s
--disable-batching --help --key-value-key-file --separator -dr -k -m -v
--disable-replication --key --messages --value-schema -ekn -ks -n -vs
--encryption-key-name --key-schema --num-produce --version -ekv -kvet -p
--encryption-key-value --key-value-encoding-type --properties -c -f -kvk -r
Modifications
- Add
generate-completioncommand to thepulsar-adminandpulsar-client, which supports the bash and zsh
Documentation
- [ ]
doc - [ ]
doc-required - [x]
doc-not-needed - [ ]
doc-complete