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

Allow for a custom starting directory #104

Closed polprog closed 2 years ago

polprog commented 2 years ago

I really like Yori and I've switched to it on all my Windows machines. It gives me a very unix like experience to which im used to. However Yori starts in C:\Windows\System32 as the default working directory. I usually want to operate on files in my user profile directory (C:\Users\foo..). Typing cd ~ takes a while especially since on some layouts the tilde is used as Alt-Gr and to get an actual tilde one needs to press the key combo twice.

I propose a couple ways to solve this:

What do you think?

malxau commented 2 years ago

How is Yori being launched in this scenario?

Normally Yori keeps the current directory of the parent process. When launched from Explorer, the starting directory is specified in the shortcut properties. For the shortcut in the start menu, this could be changed with scut -modify ~Programs\Yori.lnk -workingdir c:\ .

polprog commented 2 years ago

Ah, this is probably it. It's launched from the start menu, I will test if changing that works