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
I have a feature request after searching the past issues here. My use case is the following:
I have a CLI in front of another CLI. I want to handle some of the incoming options, and then pass the remaining options on. I do not know what the remaining options could be.
I can think of three ways to solve this.
Utilize the -- separator. This could work, but I don't want to confuse the consumers of the first CLI of which options go on which side.
Start deleting recognized options off the resulting argv until only unrecognized are remaining.
Put a new group of unrecognized on the resulting argv. Even though yargs is smart enough to parse unrecognized options and put them on argv, they are ungrouped and indistiguishable (to the best of my knowledge) from recognized options. Putting them in a new unrecognized group would solve this.
Add a new handler function unrecognizedOption. I could then store these for later invoking the second CLI.
I look forward to your response!
The text was updated successfully, but these errors were encountered:
Probably the reason you didn't find it is because it's on the yargs-parser repo, rather than this yargs repo. My original ticket here that I created the PR to cover is #1243, which probably didn't quite match your searches. The actual code change is 100% in the parser, so that's why the PR is there.
I have a feature request after searching the past issues here. My use case is the following:
I have a CLI in front of another CLI. I want to handle some of the incoming options, and then pass the remaining options on. I do not know what the remaining options could be.
I can think of three ways to solve this.
--
separator. This could work, but I don't want to confuse the consumers of the first CLI of which options go on which side.argv
until only unrecognized are remaining.unrecognized
on the resultingargv
. Even though yargs is smart enough to parse unrecognized options and put them onargv
, they are ungrouped and indistiguishable (to the best of my knowledge) from recognized options. Putting them in a newunrecognized
group would solve this.unrecognizedOption
. I could then store these for later invoking the second CLI.I look forward to your response!
The text was updated successfully, but these errors were encountered: