-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
env: implement -S/--split-string #5710
Comments
I can reproduce and run the gnu test. I'll start with working on a fix now. |
I ran into a challenge and I could make use of some ideas. Is there something like this already available in uutils or a external crate? |
I'll try to use crate |
I tried multiple different crates that claim parsing shell like syntax, but none of them supports all the corner cases from the gnu test suite. This is a really challenging task. I briefly checked the gnu implementation. They are really implementing their own custom parser for this. I would really like to avoid this. But maybe we don't get around this if we want the test suite pass 100%. What do you think? Is it worth to implement some own parser? Or should we start to improve an existing, but external crate? |
The format seems very specific based on the docs here: https://www.gnu.org/software/coreutils/manual/html_node/env-invocation.html#g_t_002dS_002f_002d_002dsplit_002dstring-syntax I think it should unfortunately be a custom parser, because other crates probably aren't interested in this functionality and we need 100% compatibility. Maybe we could use Also, I have to ask you not to look at the GNU source code for licensing reasons. We need to implement this based on the test suite and the documentation alone. |
The GNU doc says:
The code:
https://github.com/uutils/coreutils/blob/main/src/uu/env/src/env.rs
Tested in GNU with tests/env/env-S.pl
The text was updated successfully, but these errors were encountered: