helix
helix copied to clipboard
Helix hangs on startup with no filename
Summary
When starting hx with no file arguments, (e.g. hx, hx -vvv, but not hx path or hx --tutor) it hangs indefinitely at startup.
I noticed that this seems to only affect hx when starting via git bash on ConEmu. Running it through cmd, I had no issue.
Also, this is almost certainly irrelevant but the path in the last log entry was a non existent file/folder in the working directory that I invoked hx in
Reproduction Steps
I tried this:
hx
I expected this to happen:
helix opens with a scratch buffer
Instead, this happened:
helix hangs indefinitely
Helix log
tail ~/.cache/helix/helix.log
2022-10-10T10:37:39.242 helix_term::job [DEBUG] waiting on jobs...
2022-10-10T10:37:40.653 helix_loader [DEBUG] Located configuration folders: []
2022-10-10T10:37:44.116 helix_term::job [DEBUG] waiting on jobs...
2022-10-10T10:37:45.102 helix_loader [DEBUG] Located configuration folders: []
2022-10-10T10:37:46.491 helix_term::job [DEBUG] waiting on jobs...
2022-10-10T10:37:47.377 helix_loader [DEBUG] Located configuration folders: []
2022-10-10T10:37:50.659 helix_term::job [DEBUG] waiting on jobs...
2022-10-10T10:43:06.039 helix_loader [DEBUG] Located configuration folders: []
2022-10-10T10:43:20.852 helix_term::job [DEBUG] waiting on jobs...
2022-10-10T10:44:52.193 helix_loader [DEBUG] Located configuration folders: [C:\\(pwd omitted)\\.helix]
Platform
Windows
Terminal Emulator
ConEmu 220807 [64] {Alpha} ConEmu 210912 [64] {Stable}
Helix Version
helix 22.08.1 (66276ce6)
This is a known issue with the git-for-windows bash:
Some console programs, most notably non-MSYS2 Python, PHP, Node and OpenSSL, interact correctly with MinTTY only when called through winpty (e.g. the Python console needs to be started as winpty python instead of just python). link
You'll also find that some other editors such as neovim have the same behavior.
You can work around this by launching helix through winpty (i.e. winpty hx). I don't recommend it though, as this doesn't support truecolor or 256 color.
Other than that, if you really need bash you could also use WSL.
Edit: weirdly enough, it does work in wezterm. So it does somehow depend on what terminal is being used, too.
Oh I'm glad this isn't some other phantom issue on my work PC; though unfortunately WSL is out of the picture in my case. I'm glad there's a workaround, and I'd far prefer to have a functional editor with no pretty colours, than the reverse.
Just tested, this is a viable workaround for both this issue and #4194