malxau / yori

Yori is a CMD replacement shell that supports backquotes, job control, and improves tab completion, file matching, aliases, command history, and more.
http://www.malsmith.net/yori/
MIT License
1.24k stars 31 forks source link

Launching Yori from address bar in explorer.exe doesn't open Yori with correct path #127

Open stianhoiland opened 3 months ago

stianhoiland commented 3 months ago

A neat trick I learned not too long ago while looking for an "Open Console Here" shell extension, is that you can use the address bar in explorer.exe like the Run command and it'll pass the current path along. So, I ended up not downloading that shell extension for the nth time, but instead worked a muscle memory for quickly typing [Ctrl+L] cmd [Enter] in File/Windows Explorer, which opens a console with the current folder as cwd.

Now that I'm using Yori, I find myself [Ctrl+L] yori [Enter], and while Yori opens, it doesn't take the path, but instead opens to my user/home folder.

Any way to get this working so that yori'ing in the address bar gets the native behavior?

malxau commented 3 months ago

Explorer seems to have a heuristic to determine whether to launch a shortcut or an executable. For Yori, if you created shortcuts, it’ll pick the shortcut from the start menu or desktop and apply the working directory from those rather than the executable. Cmd works because the shortcut is “command prompt” but the executable is cmd, so there’s no ambiguity. One workaround is to type “yori.exe”. Another is to rename the shortcuts, and modify the description within them.