helix-editor / helix

A post-modern modal text editor.
https://helix-editor.com
Mozilla Public License 2.0
31.15k stars 2.3k forks source link

Running command/script with sudo inside `:sh` #11008

Closed mfirhas closed 1 week ago

mfirhas commented 1 week ago

Summary

So I need to run a script inside helix with sudo inside, password prompt suddenly appear at the cursor location but seems broken. I tried to insert the password, after pressing enter it freeze, and keep lagging. Tried inserting another command, but helix became unresponsive, not only that, the UI was broken. After sometime it got responsive I just quit and restart helix.

Screenshot 2024-06-21 at 23 09 33

Reproduction Steps

I tried this: 1. `:sh some-script-or-command-with-sudo` I expected this to happen: prompt password(masked) and enter, and everything executed normally. Instead, this happened: Freeze, unresponsive, UI broken. ### Helix log
~/.cache/helix/helix.log ``` 2024-06-21T23:05:04.928 helix_term::commands [ERROR] Shell error: sudo: 3 incorrect password attempts ```
### Platform macOS ### Terminal Emulator wezterm 20240203-110809-5046fc22 ### Installation Method brew ### Helix Version helix 24.3 (2cadec0b)
kirawi commented 1 week ago

Duplicate of https://github.com/helix-editor/helix/issues/1976