]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
ceph: make -h/--help show match when some args are supplied 43875/head
authorSage Weil <sage@newdream.net>
Wed, 10 Nov 2021 16:53:35 +0000 (11:53 -0500)
committerSage Weil <sage@newdream.net>
Wed, 10 Nov 2021 21:30:47 +0000 (16:30 -0500)
commitf988b2a833ea506de7e6709a03bbd3d6aff9b482
treee18ca09d3a9d83b295782c43c0b85d1636add0d6
parentac6766c9292341a4bd004bfa5410539722349f5e
ceph: make -h/--help show match when some args are supplied

Currently,

 # ceph orch ls -h
 ...
 orch ls [<service_type>] [<service_name>] [--export] [--  List services known to orchestrator
  format {plain|json|json-pretty|yaml}] [--refresh]
 # ceph orch ls osd -h
 ... nothing ...

because the CLI is provided more arguments than the command prefix.  Make
-h drop right-hand args until we get at least one prefix match.  This
means we can have a partial command written with some args and add -h to
get a usage for that command.

Signed-off-by: Sage Weil <sage@newdream.net>
qa/workunits/cephtool/test.sh
src/ceph.in