Project

General

Profile

Feature #21633

Allow modification of additional help texts

Added by Tomáš Strachota over 5 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Category:
Hammer core
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Team Backlog:
Fixed in Releases:
Found in Releases:
In Kanboard:
Red Hat JIRA:

Description

Hammer allows to append additional texts to standard help generated for commands. It's currently not possible to modify the help text and pugins can't add paragraphs or lists to existing sections in help.

TextBuilder in help should provide interface for looking up help items (sections, lists, texts) and modifying their contents, e.g.:

# Find existing section ':provider_options' and add section 'Libvirt'
base.extend_help do |h|
  h.find_section(:provider_options).section(_('Libvirt')) do |h|
    h.list([
      ['cpus',   _('Number of CPUs')],
      ['memory', _('String, amount of memory, value in bytes')],
      ['start',  _('Boolean (expressed as 0 or 1), whether to start the machine or not')]
    ])
  end
end


Related issues

Related to Hammer CLI - Feature #21635: Extensible commands in hammerClosed

Associated revisions

Revision 99cf9e5b (diff)
Added by Oleh Fedorenko over 4 years ago

Fixes #21633 - Allow modification of additional help texts (#277)

History

#1 Updated by Tomáš Strachota over 5 years ago

#2 Updated by Oleh Fedorenko about 5 years ago

  • Assignee set to Oleh Fedorenko
  • Status changed from New to Assigned

#3 Updated by The Foreman Bot almost 5 years ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/hammer-cli/pull/277 added

#4 Updated by Oleh Fedorenko over 4 years ago

  • Status changed from Ready For Testing to Closed

Also available in: Atom PDF