I noticed that sometimes commands can be completed.
eg. xm command in xen.
enter xm [space] [tab] and print out the actual parameters which are:
addlabel destroy info network-attach resume sysrq vnet-delete block-attach dmesg labels network-detach rmlabel top vnet-list block-detach domid list network-list save trigger vtpm-list block-list domname loadpolicy new sched-credit unpause cfgbootpolicy dry-run log pause sched-sedf uptime console dump-core makepolicy reboot serve vcpu-list create dumppolicy mem-max rename shutdown vcpu-pin debug-keys getlabel mem-set resources start vcpu-set delete help migrate restore suspend vnet-create
This is a pretty spot!
How can I implement my own command completion on Linux?
source share