-
-
Notifications
You must be signed in to change notification settings - Fork 150
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
Bug: read -n strips leading and trailing whitespace #1937
Labels
Comments
Was bitten by this when testing channels. |
Hmm actually this is an Oils bug only? What's wrong with bash?
Great find, thank you I believe it might be related to stripping leading and trailing whitespace |
|
andychu
changed the title
[ BUG ] both bash and ysh can't read string input correcty with
Bug: read -n strips leading and trailing whitespace
Apr 9, 2024
read -n
when input contains spaces
OK I wrote some failing spec tests I think there are multiple things going on here, let me start a Zulip thread |
andychu
pushed a commit
that referenced
this issue
Apr 9, 2024
This affects read vs read myvar read -r vs read -r myvar read -n 99 vs read -n 99 myvar Shells disagree about this! But we're following bash. This is issue #1937
andychu
pushed a commit
that referenced
this issue
Apr 10, 2024
As a YSH style API for read -n, which takes an optional value.Place. Updated doc/ref, and doc/idioms Inspired by issue #1937.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Script a:
script b:
test:
The text was updated successfully, but these errors were encountered: