main: tweak 'west help' text for extensions
Use the phrase "extension commands" and print the project path along with its name. We don't use {name_and_path} here because users probably aren't used to that format yet. Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
This commit is contained in:
parent
a335ea0510
commit
88d750bed5
|
@ -168,8 +168,10 @@ class WestArgumentParser(argparse.ArgumentParser):
|
|||
if not specs:
|
||||
continue
|
||||
|
||||
append('commands from project at "{}":'.
|
||||
format(path))
|
||||
project = specs[0].project # they're all from this project
|
||||
append(project.format(
|
||||
'extension commands from project '
|
||||
'{name} (path: {path}):'))
|
||||
|
||||
for spec in specs:
|
||||
self.format_extension_spec(append, spec, width)
|
||||
|
|
|
@ -362,11 +362,11 @@ def test_extension_command_multiproject(repos_tmpdir):
|
|||
# The newline shenanigans are for Windows.
|
||||
help_text = '\n'.join(cmd('-h').splitlines())
|
||||
expected = '\n'.join([
|
||||
'commands from project at "{}":'.format(os.path.join('subdir',
|
||||
'Kconfiglib')),
|
||||
'extension commands from project Kconfiglib (path: {}):'.
|
||||
format(os.path.join('subdir', 'Kconfiglib')),
|
||||
' kconfigtest: (no help provided; try "west kconfigtest -h")', # noqa: E501
|
||||
'',
|
||||
'commands from project at "net-tools":',
|
||||
'extension commands from project net-tools (path: net-tools):',
|
||||
' test-extension: test-extension-help'])
|
||||
assert expected in help_text, help_text
|
||||
|
||||
|
|
Loading…
Reference in New Issue