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

input --supress-output returns immediately #9396

Open
Sygmei opened this issue Jun 10, 2023 · 8 comments
Open

input --supress-output returns immediately #9396

Sygmei opened this issue Jun 10, 2023 · 8 comments
Labels
🐛 bug Something isn't working platform-specific platform-specific issues windows A Windows specific issue

Comments

@Sygmei
Copy link
Contributor

Sygmei commented Jun 10, 2023

Describe the bug

I am unable to input anything when using the -s flag

How to reproduce

  • Use input -s

Expected behavior

We should be able to input text even if it doesn't show

Screenshots

No response

Configuration

key value
version 0.80.0
branch
commit_hash 8695b57
build_os windows-x86_64
build_target x86_64-pc-windows-msvc
rust_version rustc 1.67.1 (d5a82bbd2 2023-02-07)
rust_channel 1.67.1-x86_64-pc-windows-msvc
cargo_version cargo 1.67.1 (8ecd4f20a 2023-01-10)
build_time 2023-05-16 22:27:13 +00:00
build_rust_channel release
features default, zip
installed_plugins

Additional context

No response

@Sygmei Sygmei added the needs-triage An issue that hasn't had any proper look label Jun 10, 2023
@fdncred
Copy link
Collaborator

fdncred commented Jun 10, 2023

I think it's meant to be used like this

❯ let ui = (input -s)
❯ $ui
blah

@amtoine
Copy link
Member

amtoine commented Jun 10, 2023

agree with @fdncred
--suppress-output only does not show the key presses while entering an input but it outputs the whole thing when pressing enter 😋

@Sygmei
Copy link
Contributor Author

Sygmei commented Jun 10, 2023

Maybe I wasn't clear enough in my issue 🙇
Thing is, I can't even type anything in the input, it shows the prompt again immediately

~
❯ let password = (input -s "Password :")
Password :
<New prompt appears immediately without waiting for any input>
~
❯

@Sygmei
Copy link
Contributor Author

Sygmei commented Jun 10, 2023

Note that the problem only exists on Windows, it works without issues on Linux

@amtoine
Copy link
Member

amtoine commented Jun 10, 2023

ooooh i get it now, thanks for the clarification @Sygmei
i'm on linux so didn't see the issue 😉

@amtoine amtoine added 🐛 bug Something isn't working platform-specific platform-specific issues windows A Windows specific issue and removed needs-triage An issue that hasn't had any proper look labels Jun 10, 2023
@amtoine
Copy link
Member

amtoine commented Jun 10, 2023

that'd be cool if the input -s command could print * for each key press, thus hiding the input but still having something dynamically being typed 😋

@Sygmei
Copy link
Contributor Author

Sygmei commented Jun 10, 2023

Even better with a configurable character which defaults to *

@fdncred
Copy link
Collaborator

fdncred commented Jun 10, 2023

I've reproduced the problem on Windows. I've seen this before with input and we've fixed it before but I don't remember what the fix was.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working platform-specific platform-specific issues windows A Windows specific issue
Projects
None yet
Development

No branches or pull requests

3 participants