mfaerevaag/wd

Can't rm WD paths with a slash (`/`) in them.

joncalhoun opened this issue · 4 comments

To replicate:

wd add some/path

This adds a path and works fine, and wd some/path works, btu when you do wd rm some/path you get an error:

sed: 1: "/^some/path:.*$/!p": unterminated substitute pattern

For reference, I use slashes to categorize my warp points. Eg I will do wd go/jon for cd $GOPATH/src/github.com/joncalhoun

Thanks for reporting! Honestly, I'm would not be shocked if there's a bug in the zsh regex stuff... I'm about to hand in my thesis, but I'll try to take a look at it asap 👍

Thanks, and feel free to take your time. I'm not blocked by this or anything.

Judging by the error, it's because sed uses / to separate it's 'find' and 'replace' expressions, so having an unescaped slash as part of the expression causes it to be spooked

See PR for my proposed solution