Skip to content
New issue

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

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

Already on GitHub? # to your account

read --lines #883

Open
andychu opened this issue Jan 7, 2021 · 4 comments
Open

read --lines #883

andychu opened this issue Jan 7, 2021 · 4 comments

Comments

@andychu
Copy link
Contributor

andychu commented Jan 7, 2021

Good use case here:

https://lobste.rs/s/ritbgc/what_glue_languages_do_you_use_like#c_nhikri

It could have the semantics of xargs --no-run-if-empty

Although you still want the "else" clause to print nothing, so maybe it's not that much of a win?

From #843

@andychu andychu changed the title each builtin read --lines Jan 9, 2021
@andychu
Copy link
Contributor Author

andychu commented Jan 9, 2021

I think read --lines is better than each. At least for now. Then you don't have to deal with the MAX ARGV length problem.

@andychu
Copy link
Contributor Author

andychu commented Jan 14, 2021

We have some tests for this

  • read --lines
  • read --lines --with-eol
  • read --lines --qsn

Maybe wait until somebody needs it

This is basically for pipe -> array. We have write --qsn for array -> pipe. So it makes sense to have this for symmetry.

@lulcat
Copy link

lulcat commented Feb 16, 2021

On a sidenote, is it possible to compile this with replxx instead of --without-readline?

@andychu
Copy link
Contributor Author

andychu commented Feb 16, 2021

That's #460

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants