]> git.proxmox.com Git - pve-common.git/commit
cli: allow specifying sub commands through $cmddef
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 9 Jan 2018 12:25:31 +0000 (13:25 +0100)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Thu, 18 Jan 2018 07:59:34 +0000 (08:59 +0100)
commit50b89b88bb961feab61fdacd454c7851c2629f17
treea77add7f28bc87e58cdef0345d7269278f9941b9
parent4c802a572c726b3e7cb001308f38dee8de5b4060
cli: allow specifying sub commands through $cmddef

allow to use sub commands alá
 # pveum user add

The new resolve_cmd traverses $cmddef, resolves one level of aliases
and returns the respective sub command, its cmddef, arguments and if
it was expanded (e.g., pveum u d ... => pveum user delete ...) which
allows quite easy integration in the usage/synopsis generator, bash
completion helper and command handler.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/PVE/CLIHandler.pm