You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When generating the README for <!-- commands --> section for aliases, the generator strips any string matching the command alias from any flag values in the USAGE section.
We have a command with an alias a, and when the README is generated with npx oclif readme, the USAGE output for that alias command documentation is missing the character a from the USAGE string.
Expected output:
USAGE
$ px a [--debug] [-r us-east-1|us-west-2] [-p <value>]
Actual output:
USAGE
$ px a [--debug] [-r us-est-1|us-west-2] [-p <vlue>]
Note the strings us-est-1 and vlue in the output
To Reproduce
Steps to reproduce the behavior:
for any flag value in a command, add an alias to the command matching either a character or string of characters in the flag. For example, if you have command with a flag value of us-east-1, set a command alias of any substring of that value, east, a, us-east-1, etc.
Generate README including alias documentation (npx oclif readme --aliases)
Review the generated README.md and note that the command USAGE output is missing the aliases substring from the flag output.
Your Environment (please complete the following information):
oclif Version [e.g. 4.5.0].
@oclif/core@3.26.6
oclif@4.11.3
OS & version: [e.g. MacOS Monterey, Ubuntu 20.04.4 LTS, Windows 10]
Ubuntu 22.04 ARM
MacOS 14.4.1 ARM
node 20.14.0
node 18.14.2
Shell/terminal & version [e.g. bash-3.2, bash-5.0, zsh 5.8, powershell 7.2.4, cmd.exe, Windows Terminal w/ powershell, etc... ]
zsh 5.6
bash 5.1.16
Additional context
This only occurs with the first matching command alias.
The text was updated successfully, but these errors were encountered:
@zmully Thanks for the issue. It looks like it happens on --help too, which means this is an issue in oclif/core - not the readme command. I'll transfer the issue to that repo
mdonnalley
changed the title
Readme generator > v4 strips strings from USAGE flags when they match command alias
Help strips strings from USAGE flags when they match command alias
May 31, 2024
Describe the bug
When generating the README for
<!-- commands -->
section for aliases, the generator strips any string matching the command alias from any flag values in the USAGE section.We have a command with an alias
a
, and when the README is generated withnpx oclif readme
, the USAGE output for that alias command documentation is missing the charactera
from the USAGE string.Expected output:
Actual output:
Note the strings
us-est-1
andvlue
in the outputTo Reproduce
Steps to reproduce the behavior:
us-east-1
, set a command alias of any substring of that value,east
,a
,us-east-1
, etc.npx oclif readme --aliases
)Your Environment (please complete the following information):
oclif
Version [e.g. 4.5.0].Additional context
This only occurs with the first matching command alias.
The text was updated successfully, but these errors were encountered: