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: add -s support for read builtin #1063

Merged
merged 1 commit into from
Aug 8, 2024
Merged

Conversation

davidhulick
Copy link
Contributor

This implements the -s option for the read builtin using the ReadPassword function in the golang.org/x/term package. This is a less featureful (and as a result, simpler) implementation of the -s flag than is present in #865

Like PR865, I am also unsure of how to test the -s flag since it requires interacting with the terminal input.

Copy link
Owner

@mvdan mvdan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! SGTM, just two nits. I agree testing this is hard and not really worth it, given that it's really three lines of simple code.

interp/builtin.go Outdated Show resolved Hide resolved
interp/builtin.go Outdated Show resolved Hide resolved
@mvdan mvdan merged commit ccc828f into mvdan:master Aug 8, 2024
8 checks passed
This was referenced Sep 16, 2024
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

Successfully merging this pull request may close these issues.

2 participants