mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00: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:
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
|
||||
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",
|
||||
help="verbose mode (-vvv for more, -vvvv to enable connection debugging)")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user