less icon indicating copy to clipboard operation
less copied to clipboard

Some keys are ignored when used from WSL

Open mdentremont opened this issue 3 years ago • 3 comments

Per Delta's recommendations, I've replaced git's less.exe with this version (from here).

The reason I'm using Window's git, is that my git repository is checked out on the Windows filesystem, so using git.exe is much faster than the WSL git.

Everything works great, except that some keys are ignored in less. The most noticeable is the lowercase "L" key. Other keys which are ignored are ";", and "=".

My workaround is to chain those keys with "alt", and they work fine. It's not a major issue, but it is kind of annoying and most of the time I do a search in less, wonder why it didn't work, then go back and realize a character was ignored.

To reproduce, install WSL (I'm using v1, this may not be an issue in v2), download less.exe from here, then run less.exe some file, and try to search. You should see that the above keys are ignored.

I tried to see if this was reproducible in Git Bash - but this version of less just seems to dump to stdout when ran from there (the regular less.exe which comes with git behaves properly).

mdentremont avatar Dec 23 '20 18:12 mdentremont

First, I don't know what WSL is, can you elaborate?

Second, building from the less github source is not recommended except for developers who are working on less itself. You should be downloading the "recommended" less source from http://greenwoodsoftware.com/less/download.html. If there is a beta release posted there which has a particular feature you want, you could also download the beta release. But the intermediate versions checked in to github are not guaranteed to be working at all. Can you confirm whether you see this issue when building from less-563 downloaded from the greenwoodsoftware site?

gwsw avatar Dec 31 '20 17:12 gwsw

WSL

  • https://en.wikipedia.org/wiki/Windows_Subsystem_for_Linux
  • https://docs.microsoft.com/en-us/windows/wsl/about

jftuga avatar Jan 11 '21 19:01 jftuga

@gwsw I did use the latest version from http://greenwoodsoftware.com/less/download.html (563).

The link @jftuga posted is what I'm using (specifically I'm on WSL 1).

I completely understand if this is outside the scope of what you care to look into, I just figured I'd post here just in case anything came to mind -- I do have a workaround of pressing alt+l, alt+; and alt+= so it's not the end of the word if I just need to live with the issue 👍

mdentremont avatar Jan 11 '21 20:01 mdentremont