Is there a way to use cygwin with w/ Listary such that if I type a keyword like:
cygwin keyword
Whatever directory the folder of whatever file I select that matches keyword is automatically cd’d to?
Is there a way to use cygwin with w/ Listary such that if I type a keyword like:
cygwin keyword
Whatever directory the folder of whatever file I select that matches keyword is automatically cd’d to?
This should be possible.
Thanks for the pointer.
This took a while, but this is what I setup:
Hot key: none
Keyword: none
Name: Open with Cygwin
Path: C:\cygwin\bin\sh.exe
Parameter: -lc ‘cd “cygpath "{action_path:parent}"
”; bash’
I use xhere
as the name of keyword to launch bash in current directory.
If you use mintty
. try below
For Options -> Keywords -> Custom
Keyword: xhere
Display title: xhere
Path: C:\cygwin\bin\mintty.exe
Paramter: -i /Cygwin-Terminal.ico -p 75,200 -s 98,60 -o Font=Consolas -o FontHeight=13 -e /bin/xhere /bin/bash
-p specify location in pixel, -s size in character
/bin/xhere’s first arg is program to execute, second argument is starting directory (optional).
For Options -> Actions
Keyword: xhere
Name: xhere
Path: C:\cygwin\bin\mintty.exe
Paramter: -i /Cygwin-Terminal.ico -p 75,200 -s 98,60 -o Font=Consolas -o FontHeight=13 -e /bin/xhere /bin/bash "{action_path:parent}"
The second one satisfy you requirement. The workflow is invoke listary -> type string pattern -> Ctrl-o -> type “xh” then type Enter. Done.
The first one works flawless in find as type mode (instead of launch app mode), just type “xhere” then press enter when you are in Explorer.
Why use xhere
,
xh
shows it, usually no file matches.chere
, see https://stackoverflow.com/questions/9637601/open-cygwin-at-a-specific-folder
Summary:
bat
or lnk
file.chere
package of cygwin.Hi @qeatzy, I gave this a shot but didn’t have any luck with either of them.
In both cases, my terminal opens and takes me to the home directory, not the parent directory of the file I want to.