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

interp: Support more flags on the "read" builtin #551

Open
andreynering opened this issue Apr 25, 2020 · 2 comments
Open

interp: Support more flags on the "read" builtin #551

andreynering opened this issue Apr 25, 2020 · 2 comments

Comments

@andreynering
Copy link
Collaborator

Originally asked on go-task/task#314.

There are some missing options on the read builtin. The -p one seems particularly useful on scripts.

sh/interp/builtin.go

Lines 473 to 479 in b7aede0

switch args[0] {
case "-r":
raw = true
default:
r.errf("read: invalid option %q\n", args[0])
return 2
}

@mvdan
Copy link
Owner

mvdan commented Apr 28, 2020

Sure - patches welcome :)

mvdan pushed a commit that referenced this issue Aug 26, 2021
I have implemented the "read -p" flag, as requested in issue #551.
Included are new test cases to cover the added feature,
as well as the integration of -p with the existing code that handles read.
All test cases old and new are passing.
@blackjid
Copy link

I think is already supported.

I wonder if the read -s silent would be possible to be able to read password or secrets.

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

No branches or pull requests

3 participants