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
{{ message }}
Repository navigation
Support short flag batches that take args for external completions #5923
We recently landed #7527 that passes unknown flag combinations through to the underlying external properly. So this should work with git and friends in the next release.
For commands defined in nushell directly we don't have a clear strategy yet but would be open to discussion!
Could I work on a PR that doesn't error if the batch of short flags has a single flag that requires an argument? :)
This sounds like a great place to improve Quality-of-life! So we are happy if you give this a go. Our flag story is certainly not trivial as we have to support both flexibility in externs and our typed signatures.
From your mentioned scope and the minimal example in the issue description it sounds self-contained and implementable with the information we have at parse time.
Activity
meskill commentedon Dec 23, 2022
Is nushell team going to implement this? Or it's still in discussion phase.
sholderbach commentedon Dec 23, 2022
We recently landed #7527 that passes unknown flag combinations through to the underlying external properly. So this should work with
gitand friends in the next release.For commands defined in nushell directly we don't have a clear strategy yet but would be open to discussion!
MariaSolOs commentedon Apr 7, 2023
@sholderbach Could I work on a PR that doesn't error if the batch of short flags has a single flag that requires an argument? :)
sholderbach commentedon Apr 7, 2023
This sounds like a great place to improve Quality-of-life! So we are happy if you give this a go. Our flag story is certainly not trivial as we have to support both flexibility in externs and our typed signatures.
From your mentioned scope and the minimal example in the issue description it sounds self-contained and implementable with the information we have at parse time.
What I am unsure about: Is there a reason why @kubouch has added a test (https://github.com/nushell/nushell/pull/7527/files#diff-36b8362d860bbb63b9805d1d0bbbcb5db404419d6f4e657f82a4dd8f3cadb211R42-R48) that documents the rejection of batched flags with an argument value.
MariaSolOs commentedon Apr 7, 2023
Amazing, thanks @sholderbach! And yes, it would be insightful to know more about why this was explicitly disallowed.
kubouch commentedon Apr 9, 2023
I added the test just to cover the way it used to work, it can be changed.
fix(parser): pass `-Zscript` and `-j8` through to a known external (#…