mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Override help string version (#49545)
This fix adds additional help message to version command options Fixes: #20488 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
parent
5a59748e6c
commit
c9325ca247
2 changed files with 6 additions and 0 deletions
2
changelogs/fragments/49545-ansible-doc_version_help.yaml
Normal file
2
changelogs/fragments/49545-ansible-doc_version_help.yaml
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
minor_changes:
|
||||||
|
- Updated Ansible version help message in help section.
|
|
@ -417,6 +417,10 @@ class CLI(with_metaclass(ABCMeta, object)):
|
||||||
|
|
||||||
# base opts
|
# base opts
|
||||||
parser = SortedOptParser(usage, version=CLI.version("%prog"), description=desc, epilog=epilog)
|
parser = SortedOptParser(usage, version=CLI.version("%prog"), description=desc, epilog=epilog)
|
||||||
|
parser.remove_option('--version')
|
||||||
|
version_help = "show program's version number, config file location, configured module search path," \
|
||||||
|
" module location, executable location and exit"
|
||||||
|
parser.add_option('--version', action="version", help=version_help)
|
||||||
parser.add_option('-v', '--verbose', dest='verbosity', default=C.DEFAULT_VERBOSITY, action="count",
|
parser.add_option('-v', '--verbose', dest='verbosity', default=C.DEFAULT_VERBOSITY, action="count",
|
||||||
help="verbose mode (-vvv for more, -vvvv to enable connection debugging)")
|
help="verbose mode (-vvv for more, -vvvv to enable connection debugging)")
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue