Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

ANSI Prompt messes up list output.

I have tried wsl less file.txt in all shells in all environments.

All the keys for WSL LESS work for me in any environment.

Ditto for Windows Terminal, using TCC/CMD/PS5/PS7.

Can you maneuver through a man file? That is, wsl man less

Joe
That way, they work for me too. But in a pipe, none work.
 
Joe, does wsl less work for you in a pipe?
Using;
Code:
type test.txt | wsl less

TCC/TCMD - Yes. The keys e y h q all work.
PS51/TCMD - Yes. The keys e y h q all work.
PS7/TCMD - Not really. The keys e y h q all work, but the text is not vertical.
CMD/TCMD - Not really. The keys e y h q all work, but the text is not vertical.

Joe
 
Interesting! WSL1 or WSL2? No keys work here (WSL2) in any of those scenarios. I wonder why it works for you!

The issue is known ... here.
 
About the "list.exe" from Windows SDK ...

It's not necessary to install the SDK, it's possible to extract "list.exe" as following (example for 64-bit systems):

1) Download the ISO via link: https://go.microsoft.com/fwlink/p/?linkid=2120735
2) Create a disc (for example USB)
3) Go to DIR "Installers", there you will find the file "X64 Debuggers And Tools-x64_en-us.msi"
4) Extract this "X64 Debuggers And Tools-x64_en-us.msi" for example with the "msiexec" command as follows:
msiexec /a "X64 Debuggers And Tools-x64_en-us.msi" /qn targetdir=YourDesiredDrive\YourDesiredDir
5) Navigate to the path "YourDesiredDrive\YourDesiredDir\Windows Kits\10\Debuggers\x64\",
there you will find the "list.exe" - copy it to your desired location and all should be ready to use it

PS: It has even an integrated HEX Editor, which is not documentated in the integrated Help. Press "H" to activate it ... however: I have problems there for ex. with german umlauts (yet?))
 
Last edited:
Interesting! WSL1 or WSL2? No keys work here (WSL2) in any of those scenarios. I wonder why it works for you!

The issue is known ... here.
I only have WSL1 installed.

Thanks for the Git Link. It shows that this issue is (presently) one of 24 different "needs-investigation", the oldest being from June 23, 2016.

Sure is a long time for a "needs-investigation".

Joe
 
If you like LESS you can get less-394.exe (Gnu) somewhere on GitHub. It's from 2006 and 32-bit but it works fine.
 
If you like LESS you can get less-394.exe (Gnu) somewhere on GitHub. It's from 2006 and 32-bit but it works fine.
I have;
Code:
Volume in drive C is unlabeled    Serial number is acb2:6a48
 Directory of  C:\msys64\usr\bin\less.exe

2020-10-25   2:27         157,359  less.exe
             157,359 bytes in 1 file and 0 dirs    159,744 bytes allocated
on my system, which is from the MSYS2 package.

Same thing with that version of LESS, arrow keys do not work in a pipe.

Joe
 
The arrow keys (home, end, ...) all work in the one I have. Actually it was SourceForge (not GitHub) ... here.
 
Something in the back of my mind says that the location of TOOLS.INI was determined by an environment variable that one set to point to the folder in which TOOLS.INI is located, but I don't remember the name of the environment variable, and I also may not be remembering this correctly.
Thanks to the folks at SS64.com, I can now configure LIST.EXE to work with different colors.

I've placed a copy of the solution in my web archive, and I'm posting here for my future reference.

Joe
 

Similar threads

Back
Top