Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return to accepting "-" as a shell option value. #987

Open
wfhoehn opened this issue Jan 24, 2024 · 4 comments
Open

Return to accepting "-" as a shell option value. #987

wfhoehn opened this issue Jan 24, 2024 · 4 comments
Labels
status/need-feedback Calling participant to provide feedback

Comments

@wfhoehn
Copy link

wfhoehn commented Jan 24, 2024

Prior to v3.1.0 the spring-shell parser would accept "-" as the value of a shell option. This was a convenient way to indicate that the shell method should stream over inputs from STDIN and worked up through v3.0.10. Many unix commands support a similar syntax.

eg: shell:>foo --bar -

@github-actions github-actions bot added the status/need-triage Team needs to triage and take a first look label Jan 24, 2024
@wfhoehn
Copy link
Author

wfhoehn commented Jan 24, 2024

Now generates the error:

2001E:(pos 0): Unrecognised option '-'
2000E:(pos 0): Missing mandatory option, longnames='bar', shortnames='b'

@jvalkeal
Copy link
Contributor

It would be a good idea to add new functionality to parser so that it could be configured to accept single/double dash as end of options. Then remaining stuff would go into positional arguments(which user can then process manually). Is this something you're after?

@wfhoehn
Copy link
Author

wfhoehn commented Jan 25, 2024

I'm not certain that I fully understand you. Can you elaborate on "which the user can then process manually?"

@jvalkeal
Copy link
Contributor

I assume for double/single dash you meant https://unix.stackexchange.com/questions/11376/what-does-double-dash-mean. Or are you after some stdin piping magic?

@jvalkeal jvalkeal added status/need-feedback Calling participant to provide feedback and removed status/need-triage Team needs to triage and take a first look labels Aug 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/need-feedback Calling participant to provide feedback
Projects
None yet
Development

No branches or pull requests

2 participants