mfaerevaag / wd

:rocket: Jump to custom directories in zsh
MIT License
694 stars 45 forks source link

Allow slashes to cd relative to warp point #66

Open towc opened 5 years ago

towc commented 5 years ago

Say this is my setup:

cd some/path
mkdir y
wd add x
cd ~

Something I keep accidentally doing is this:

wd x/y

Instead, I guess the intended workflow is

wd x
cd y

Any chance this could be a feature? Maybe that would need enabling in the rc file, so it doesn't conflict with people's existing warp points?

Would be lovely if you could also wd x/y/z/other, not just one level deep

towc commented 5 years ago

oh, just noticed https://github.com/mfaerevaag/wd/issues/17. Maybe this should be documented somewhere more visible?

So I guess the intended flow is wd x y. Still, can this be made to work with slashes as well?

mfaerevaag commented 5 years ago

Ah you're right. We have forgot to document it actually.

And yes, I do believe it's possible, but it should considered whether it could lead to ambiguities when having warp names with slashes. That being said, I do remember we looked into this, but found that it wasn't trivial to solve due to the zsh completion syntax. You're most welcome to give it a shot yourself, though. If you submit a PR we'll be happy to look at it 😄

alpha-tango-kilo commented 4 years ago

This is now a thing! Work in progress, but the core of the functionality is there :smile:

See the PR above

p1r473 commented 5 months ago

@alpha-tango-kilo need any help with this one? Is this stuck?

alpha-tango-kilo commented 5 months ago

See the comments I left on the PR