Is your feature request related to a problem? Please describe.
Navigation between folders can be tedious if there are many levels of folders to go through.
For example, I work on Windows for my day job, and have my code checked out in my user folder. However, I need to run some of the code in a Linux process, which I use Windows Subsystem for Linux (WSL) for. But to find my code, I have to navigate out of the Linux folders and into Windows, so I end up doing a lot of cd /mnt/c/Users/Kasper/project/e/t/c
Another example is that the project I work on includes a web client written in Elm. The Elm compiler is loaded as a development dependency by NPM, so invoking my compiler is done with ./project/node_modules/elm/bin/elm if I want to do something that's not part of our build scripts. I could install the Elm compiler globally, but I would rather just be locked into the version my project is using, and not risk compiling my code with two different compilers, if I forget to update the global one.
Describe the solution you'd like
I would like to be able to specify certain shortcuts to folders basically. A simple solution would be a section in the config where I can list shortcuts ala: desktop=C:\Users\Kasper\Desktop and invoke it with a syntax ala cd */desktop and mv file */desktop (so the shortcut is not only understood by cd, but by all commands preferably)
Describe alternatives you've considered
There are a few existing solutions to this problem out there:
~ instead of */)autocd, which allows you to skip typing cd (as I have understood it at least)z/z.lua/zoxide attempt to replace cd with a command that learns your frequently visited folders and lets you type their names without providing a path.Additional context
This is relevant to what is discussed in https://github.com/nushell/nushell/issues/687
I like the idea!
A couple of points:
*. For example, */desktop could be asking to look for a file/directory named desktop in all subdirectories. Best to avoid ambiguous statements if at all possible.Using ~ is a good option, ZSH is already a complete shell, copying this idea from there may result in fewer drawbacks in the future.
The reason I liked */ is that it looks sort of like a path and evokes the idea that you're entering this folder from anywhere, due to the wildcard. I'm happy to use something else though if the risk of clashing with actual globs is too great 馃槉
Another alternative is CDPATH. From man bash:
CDPATH The search path for the cd command. This is a colon-separated
list of directories in which the shell looks for destination
directories specified by the cd command. A sample value is
".:~:/usr".
I would love a built-in autojump, though.
edit: oh, CDPATH is part of 4th suggestion
Most helpful comment
Using
~is a good option, ZSH is already a complete shell, copying this idea from there may result in fewer drawbacks in the future.