diff --git a/crmsh/command.py b/crmsh/command.py index edc6ebc86..6e115ef80 100644 --- a/crmsh/command.py +++ b/crmsh/command.py @@ -382,11 +382,9 @@ def do_quit(self, context): @completer(_help_completer) def do_help(self, context, *args): """usage: help topic|level|command""" - if context.level_name() == 'root': - levels = args - else: - levels = [context.level_name()] - levels.extend(args) + levels = [ui.name for ui in context.stack] + levels = levels[1:] # drop the 1st element "root" + levels.extend(args) h = help_module.help_contextual(levels) h.paginate() context.command_name = "" diff --git a/test/features/bootstrap_options.feature b/test/features/bootstrap_options.feature index 78e3a2395..d1eb92906 100644 --- a/test/features/bootstrap_options.feature +++ b/test/features/bootstrap_options.feature @@ -36,6 +36,8 @@ Feature: crmsh bootstrap process - options Then Expected "-x option or SKIP_CSYNC2_SYNC can't be used with any stage" in stderr When Try "crm cluster init sbd -N hanode1 -N hanode2 -y" on "hanode1" Then Expected "Can't use -N/--nodes option and stage(sbd) together" in stderr + When Try "crm corosync link help add" on "hanode1" + Then Expected return code is "0" @clean Scenario: Stage validation