agkozak/zsh-z

-x flag is not recursive and no option to enable it

Closed this issue · 6 comments

It seems odd to me that the -x flag is not recursive

I believe it would make more sense that -x should prune all child directories from the history, but I can also understand rationale of making it a separate switch, eg -X or maybe -xR

Thoughts?

It makes sense that -x should not just be recursive. But your idea is a good one. I favor -xR. I added that feature to the recursive-delete branch. Give it a try.

It strikes me, actually, that would also make sense to be able to say z -x /path/to/foo or z -xR /path/to/foo. The -x option that we've inherited from rupa/z works only on $PWD. Perhaps I'll fiddle with that later.

Thank you, @DanielFGray, for helping to make this a better plugin, and let me know what you think of the new feature.

Hold on just a bit. Some Git horror has occurred and I've lost what I was working on.

OK. The new feature should be on the recursive-delete branch now. Sorry about the wait.

I've added the ability to supply an argument to z -x and z -xR. Now you can prune your .z file without having to jump all over the place or use an editor.

I might add completions for -x and -xR.

I've merged the -xR feature to master. I'll work on the completions (all of them) soon.