Skip to content

Help Scripts in Projects

Roman Kuzmin edited this page Mar 8, 2019 · 17 revisions

Invoke-Build (script and functions)

Invoke-Build.ps1-Help.ps1

  • Help is created for the script and its functions.
  • Help is in English only.

This help script uses pre-formatted text for all topics. This is arguably the simplest way, in particular because it is literally WYSIWYG. But it requires an editor that can format text 80 columns width. Proper indentation should be used as well, for example, for the most of topics it should be 4 columns but other topics like parameters should use 8. If this is not convenient then do not use pre-formatted indented paragraphs.

Helps (script, this project)

Help is created for the script and its functions. This is the example of a localized help script skeleton and several content scripts.

Mdbc (binary module)

Mdbc.dll-Help.ps1

  • Help is created for module cmdlets.
  • The script contains test blocks that test help examples (it is done by Test-Helps).
  • Help contains a lot of pieces shared between cmdlets with variables and Merge-Helps.

FarNet.PowerShellFar (cmdlets registered manually)

PowerShellFar.dll-Help.ps1

  • Help is created for cmdlets added to a runspace on creation.
  • The script uses Merge-Helps for deriving help of child cmdlets from parent cmdlets.