wd icon indicating copy to clipboard operation
wd copied to clipboard

Allow slashes to cd relative to warp point

Open towc opened this issue 5 years ago • 5 comments

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 avatar Mar 06 '19 08:03 towc

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?

towc avatar Mar 06 '19 08:03 towc

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 😄

mfaerevaag avatar Mar 06 '19 08:03 mfaerevaag

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

See the PR above

alpha-tango-kilo avatar Sep 04 '20 22:09 alpha-tango-kilo

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

p1r473 avatar Jun 12 '24 20:06 p1r473

See the comments I left on the PR

alpha-tango-kilo avatar Jun 13 '24 09:06 alpha-tango-kilo