-
Notifications
You must be signed in to change notification settings - Fork 60
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
Comments
Hello @wmshort! Is there any bash equivalent to this proposal so I could get your use-case? 🤔 |
I guess the closest would be quoting with '"'"' but this seemed awkward and cumbersome. But I don't think there is an exact Bash equivalent for a switch of this kind. The use case is using the evaluation loop to input search queries, where the query may include single _or_ double quoted strings. In this case the entire raw string following the relevant search command should be treated as the query.
'"'"' the search query may include 'single' or even "double quoted" elements '"'"'
I understand this may be out of scope. But a switch to enable this behaviour (off by default) would be useful for my case and perhaps others.
William Michael Short
Lecturer in Classics
Department of Classics & Ancient History
University of Exeter
From: Mariusz Kupidura
Sent: Sunday 11 August, 13:44
Subject: Re: [fwkz/riposte] Per-command parsing mode? (#17)
To: fwkz/riposte
Cc: Short, William Michael, Author
Is there any bash equivalent to this proposal? 🤔
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ffwkz%2Friposte%2Fissues%2F17%3Femail_source%3Dnotifications%26email_token%3DAIWMJIVZPBTMVRITCAJTAATQEBFWFA5CNFSM4IHNKKK2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4BFMPY%23issuecomment-520246847&data=02%7C01%7CW.Short%40exeter.ac.uk%7C0b3a49db04834bb6b85208d71e838277%7C912a5d77fb984eeeaf321334d8f04a53%7C0%7C0%7C637011422491353694&sdata=Cs2wkQxLnLKjlDXFB%2BU4I8vAqnMAp2G4%2BhzdjCxaIho%3D&reserved=0>, or mute the thread<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAIWMJIRDY2KAEQGZGKA4AL3QEBFWFANCNFSM4IHNKKKQ&data=02%7C01%7CW.Short%40exeter.ac.uk%7C0b3a49db04834bb6b85208d71e838277%7C912a5d77fb984eeeaf321334d8f04a53%7C0%7C0%7C637011422491363680&sdata=oaUPWWTZ4mlgifkFQpa2vho2xiUzBkC0GnJwTxGiv5I%3D&reserved=0>.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
?The text was updated successfully, but these errors were encountered: