cirocosta / asciinema-edit

asciinema casts post-production tools
https://ops.tips
MIT License
316 stars 22 forks source link

Indent usage in help to make commands stand out #22

Open abitrolly opened 4 years ago

abitrolly commented 4 years ago

Right now, the quantize command help starts as this.

   Remove the exact frame at timestamp 12.2 from the cast file named
   1234.cast.

     asciinema-edit cut \
       --start=12.2 --end=12.2 \
       1234.cast
     quantize  Updates the cast delays following quantization ranges.

   The command acts on the delays between the frames, reducing such
   timings to the lowest value defined in a given range that they
   lie in.

This PR fixes that.

Uses https://github.com/urfave/cli/blob/master/docs/v1/manual.md#generated-help-text and sprig helper for indentation. fmt.Println(cli.AppHelpTemplate) was used to get actual template text for replacement.