broot icon indicating copy to clipboard operation
broot copied to clipboard

Windows: can't execute commands

Open muellerto opened this issue 4 years ago • 6 comments

(crap removed)

muellerto avatar Jun 09 '20 06:06 muellerto

You need to complete this issue if you want it actionned.

Canop avatar Jun 09 '20 06:06 Canop

(Sorry, for some reason I do not understand my issue escaped under my fingers without I could do anything ...)

I tried some of the typical file operations: copy, move, delete on a single existing regular file.

When I do :cp on a file and specify a destination path it tells me Unable to lanch /bin/cp: nul byte found in provided data

(BTW I did not provide any data or "a nul byte" and I can't change this. You can't blame the user for this. This message is not helpful for the user.)

The problem is: I'm on Windows, the Windows user does normally not have a cp executable on his machine. That's why you should use copy or xcopy for that, if you don't want to provide an internal algorithm to copy a file.

It's even more interesting: I have indeed a cp executable named cp.exe and it's in the search path for executables. I have also mv.exe and rm.exe (and many others) and they all work very well, I use them a lot every day. But broot doesn't find them because I don't use the typical Cygwin environment and a Unix shell like bash.

muellerto avatar Jun 09 '20 06:06 muellerto

(BTW I did not provide any data or "a nul byte" and I can't change this. You can't blame the user for this. This message is not helpful for the user.)

Totally agree with that, this isn't by design.

Finding the right executable, maybe solving the problem with a Windows dedicated configuration (overriding the default ":cp" verb), all this is impossible for me to do alone as I don't have a Windows machine. I'd need a champion to test and adapt for Windows.

Canop avatar Jun 09 '20 08:06 Canop

Windows 7.

$ broot.exe -s
Crossterm Error : "IO-error occurred" 

sergeevabc avatar Apr 13 '21 14:04 sergeevabc

Err… Hello?

sergeevabc avatar Jun 02 '21 22:06 sergeevabc

@sergeevabc Windows before version 10 isn't supported. There's just no right console on those systems.

https://dystroy.org/broot/common-problems/#broot-doesnt-seem-to-work-correctly-on-windows-before-10

Canop avatar Jun 03 '21 05:06 Canop