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

Per-command parsing mode? #17

Open
wmshort opened this issue Jul 28, 2019 · 2 comments
Open

Per-command parsing mode? #17

wmshort opened this issue Jul 28, 2019 · 2 comments

Comments

@wmshort
Copy link
Contributor

wmshort commented Jul 28, 2019

Would it be feasible (and sensical) to implement a per-command switch to specify parsing mode? In some instances it would be helpful to be able to process command arguments as raw rather than parsed tokenized strings (or even as string literals), including preserving double and single quotes. I mean something like the difference between the two commands in this fabricated example:

riposte ~$ echo "This is a string literal"
This is a string literal
riposte ~$ raw "This" 'is' a 'raw' "string"
"This" 'is' a 'raw' "string"

shlex.split()'s posix argument seems like it might be part of a solution. Ideally the mode switch could be available as a parameter when declaring a Command, or perhaps as part of guides?

@fwkz
Copy link
Owner

fwkz commented Aug 11, 2019

Hello @wmshort! Is there any bash equivalent to this proposal so I could get your use-case? 🤔

@wmshort
Copy link
Contributor Author

wmshort commented Aug 11, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants