diff options
author | Martin Kosek <mkosek@redhat.com> | 2012-01-27 16:51:37 +0100 |
---|---|---|
committer | Martin Kosek <mkosek@redhat.com> | 2012-02-06 08:57:07 +0100 |
commit | d4272ce3747b07249e1401f5525bf8758611941a (patch) | |
tree | 17ca2f40ddbb06f45dc62e09ce3f33cd5760e283 /ipalib/plugins/baseldap.py | |
parent | 3bd36af36e3f9a65287f1ed3ea8cb6a05ce40356 (diff) | |
download | freeipa.git-d4272ce3747b07249e1401f5525bf8758611941a.tar.gz freeipa.git-d4272ce3747b07249e1401f5525bf8758611941a.tar.xz freeipa.git-d4272ce3747b07249e1401f5525bf8758611941a.zip |
Add argument help to CLI
CLI command help contains a documentation for all options that can
be passed to commands. However, help strings for positional
arguments are not included.
This patch uses an OptionParser description field to list all
command arguments as OptionParser does not have a native support
to provide such information to user.
https://fedorahosted.org/freeipa/ticket/1974
Diffstat (limited to 'ipalib/plugins/baseldap.py')
-rw-r--r-- | ipalib/plugins/baseldap.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ipalib/plugins/baseldap.py b/ipalib/plugins/baseldap.py index f59a0d41..00ae9493 100644 --- a/ipalib/plugins/baseldap.py +++ b/ipalib/plugins/baseldap.py @@ -1591,7 +1591,9 @@ class LDAPSearch(BaseLDAPCommand, crud.Search): #pylint: disable=E1003 for key in self.obj.get_ancestor_primary_keys(): yield key - yield Str('criteria?', noextrawhitespace=False) + yield Str('criteria?', + noextrawhitespace=False, + doc=_('A string searched in all relevant object attributes')) for arg in super(crud.Search, self).get_args(): yield arg |