4
1
I wish to add a command on right click menu in explorer that opens current directory with cygwin.
For same I have successfully added these registries:
[HKEY_CURRENT_USER\software\classes\directory\shell\cygwin]
@="c:\\cygwin\\bin\\bash.exe --login -i -c \"cd '%1'; bash\""
[HKEY_CURRENT_USER\software\classes\drive\shell\cygwin]
@="c:\\cygwin\\bin\\bash.exe --login -i -c \"cd '%1'; bash\""
but this adds the command only when on some folder or drive. I want generic right click on explorer, on which, search gives me this registry to edit:
[HKEY_CLASSES_ROOT\Directory\Background\shell\cygwin]
@="c:\\cygwin\\bin\\bash.exe --login -i -c \"cd '%1'; bash\""
My problem lies with the value of the key, which doesnt work on %1 but on some static value like /cygdrive/c
Could someone please tell me the proper way to pass current directory to the command, also please refer me some basic and advanced pages for same.
This worked for me, but I had to install the
chere
package first, and run it aschere -i -s bash
. – Brian Z – 2016-01-28T22:03:51.7672Please add a bit of summary, the link will break sometime. – vonbrand – 2013-04-23T23:34:21.257