Running a command in a specific directory

Piotr Gliźniewicz glizda@gmail.com
Tue Mar 22 22:35:51 GMT 2022


Hi,

I'm trying to run a command at a specific "Windows" path. Basically 
something similar to what chere does for bash, but I want to execute ls 
in bash for a specific directory. I've tried variations of what chere 
leaves in the registry:

C:\cygwin64\bin\bash.exe -c "/bin/xhere /bin/bash.exe '%L'"

Adding simply `-c ls` didn't work.

To start with something simpler I've launched bash and tried just to 
guess what xhere want's, but I don't really know what's happening. I 
couldn't find any help for xhere.

/cygdrive/c
$ /bin/xhere '/bin/bash.exe -c ls' d:
/bin/xhere: line 38: [: too many arguments
/bin/xhere: line 41: [: too many arguments
/bin/xhere: line 64: [: too many arguments
Starting /bin/bash.exe -c ls
-/bin/bash: ls: command not found

/cygdrive/c
$ /bin/xhere "/bin/bash.exe -c ls" d:
/bin/xhere: line 38: [: too many arguments
/bin/xhere: line 41: [: too many arguments
/bin/xhere: line 64: [: too many arguments
Starting /bin/bash.exe -c ls
-/bin/bash: ls: command not found

Any hints, how to properly pass `/bin/bash.exe -c ls` to xhere?

--
Regards,
Piotr Gliźniewicz


More information about the Cygwin mailing list