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

Commands should accept empty string ("") inputs #47

Closed
rivy opened this issue Jan 8, 2020 · 5 comments
Closed

Commands should accept empty string ("") inputs #47

rivy opened this issue Jan 8, 2020 · 5 comments
Assignees

Comments

@rivy
Copy link

rivy commented Jan 8, 2020

Describe the bug

Empty values (""), which can be valid values, are dropped by commands.

This causes lots of headaches, ie eq "" $value is an error, arrays can't have empty values, etc.

@sagiegurari
Copy link
Owner

ya i'm been bashing my head around this back and forth if its something that should be valid or not...
since i hate to get errors on empty arguments that should be just ignored and removed.

i can say that in the dev branch (didn't push yet) i'm doing massive changes so there won't be errors in such cases and to support spread binding (variable that is converted to multiple arguments) but empty value is something that i'm trying to think if its really good or back.

the only way i can think of 'keeping' it is if its wrapped with " characters

@sagiegurari
Copy link
Owner

you know what, since it is bugging me as well... i guess it is ok to set it as empty arg. pushing a fix. thanks a lot for the feedback.
by the way the next version (coming really soon and can be seen in the dev branch) will hold many new features and a lot more commands.

@sagiegurari
Copy link
Owner

release a new version with this change

@rivy
Copy link
Author

rivy commented Jan 9, 2020

Thanks for all the work.

I'm experimenting with putting together a Makefile.toml for coreutils to more easily build cross-platform.

I've got a basic build working but need to be able to compare to empty strings for more complex platform support. And next, I'll need to read data from cargo metadata (looks already supported), parse out all uu_[a-z]+ words (regex match -- don't see any way yet), then sort and use the unique values (don't see a way yet) to auto-build all the individual utilities.

I haven't had the time to do more than experiment with the capabilities at the moment, But I might try to donate some time to understand the code and expand the capabilities along those lines in the near future.

Again, thanks for your current hard work.

@sagiegurari
Copy link
Owner

thanks a lot for the feedback.
would be happy for contributions :)

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