EliziumNet / Loopz

PowerShell iteration utilities with additional tools like the Parameter Set Tools
https://eliziumnet.github.io/Loopz/
MIT License
3 stars 0 forks source link

Ensure that commands all have Examples that show up in PowerShell help #144

Closed plastikfan closed 3 years ago

plastikfan commented 3 years ago

The PowerShell help tends to be the first port of call, when unexpected things happen, so make sure that the examples are all there and comprehensive.

plastikfan commented 3 years ago

Rename-Many already has lots of examples but they don't show up in Get-Help

get-help rename-many -Examples

just shows:

NAME
    Rename-Many

SYNOPSIS
    Performs a bulk rename for all file system objects delivered through the pipeline, via regular expression replacement.

Plastikfan@JANUS  ~\dev\github\PoSh\Loopz\Elizium.Loopz   feature/doc-examples ≢                                                                                                      [12:06]
λ get-help rename-many -Examples

NAME
    Rename-Many

SYNOPSIS
    Performs a bulk rename for all file system objects delivered through the pipeline, via regular expression replacement.

In the xml file

    <command:details>
      <command:name>Rename-Many</command:name>
      <command:verb>Rename</command:verb>
      <command:noun>Many</command:noun>
      <maml:description>
        <maml:para>Performs a bulk rename for all file system objects delivered through the pipeline, via regular expression replacement.</maml:para>
      </maml:description>
    </command:details>
    <maml:description>
...
      <maml:para>---</maml:para>
      <maml:para>* MOVE EXAMPLES (anchored)</maml:para>
      <maml:para>.EXAMPLE 1 Move a static string before anchor (consider file items only):</maml:para>
      <maml:para>gci ... | Rename-Many -File -Pattern 'data' -Anchor 'loopz' -Relation 'before'</maml:para>
      <maml:para>.EXAMPLE 2 Move last occurrence of whole-word static string before anchor:</maml:para>
      <maml:para>gci ... | Rename-Many -Pattern 'data',l -Anchor 'loopz' -Relation 'before' -Whole p</maml:para>
...

so the examples are there, but just not showing up for some reason.

plastikfan commented 3 years ago

See: