-
Notifications
You must be signed in to change notification settings - Fork 27
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
Command history with arrow keys on Windows #630
Comments
Left and right arrows also don't select auto-complete options, only the left most selection is available:
|
You can use This behaviour isn't (yet) configurable but it should just work out of the box. I'll take a look this weekend. |
This is proving more difficult than I hoped. For reasons I haven't yet figured out, Windows Terminal isn't sending any escape codes when the arrow keys are pressed. I'm assuming it is because I'm not setting the terminal mode correctly. But I've not gotten much further in my investigation thus far |
Note I'm seeing the same issue with both Windows Terminal and Alacritty 0.12.1 on Windows, so this may be a Windows thing. |
It's definitely a Windows thing. The problem is Windows doesn't have TTYs like Linux/UNIX. In fairness, TTYs themselves introduce so many issues so I'm not trying to suggest TTYs are better. But the problem here is I need to write some radically different code to compensate for the different console backend. I've been having a read through some other code out there, like termbox, and it's given me some ideas. |
Borrowing from https://github.com/containerd/console/blob/65eb8c0396d0cac15c888bcf4d47049c21317b18/console_windows.go#L191 https://github.com/kmatt/murex/commit/98aef426d94c0fc68df48bce2f486fe6d0afabef Seems to enable arrow keys history in a build of 4.3. I did not make a PR because I don't know if this is sufficient.
|
Awesome, thank you. I’ll give that a try. Can I ask a favour, do you mind writing up some instructions on how to install the additional tooling to compile from source on Windows? At the moment I’m just cross compiling from Linux myself so it would help with my own testing let alone others coming to Murex from Windows. |
@lmorg thankfully it was only ensuring that a gcc was in the path, as per the docs of go-sqlite3: https://github.com/kmatt/murex/blob/v4.3/INSTALL-Windows.md |
How about the other coreutils stuff? Was that just MinGW? |
Probably all from Git for Windows, as I don't have a MinGW installed directly:
Since AFAIK there is not an equivalent to Python's virtualenv for Go, I'm spinning up a clean Windows 11 VM to see what would be needed when not having existing development tools in place. After the 21.5 GB image downloads ... |
Its now building on a Win11 VM without Git or MinGW or a GCC being installed. I was certain a gcc was required for Would building on Windows without any dependencies installed other than Go be expected? |
honestly, I was sure gcc was required for sqlite3 too. Also you'd need Is it possible that Win11 image has git and gcc already installed? |
That did exactly the job! Thank you |
Discussed in #629
murex v4.2.5110
Originally posted by kmatt June 22, 2023
Compared to Murex on macOS, up arrow on Win10 does not retrieve command history, in either Windows Terminal or Alacritty.
Is this configurable, or an issue with the readline implementation?
The text was updated successfully, but these errors were encountered: