airblade / voom

A simplest-thing-that-works Vim plugin manager. Use with Vim 8 or Pathogen.
MIT License
29 stars 9 forks source link

Tilde(~)-expansion for local directories #20

Closed dezza closed 2 years ago

airblade commented 2 years ago

Thanks for this.

Doesn't the shell treat ~ as $HOME anyway?

Bash manual: tilde expansion.

dezza commented 2 years ago

Yes it does :)

But I found out ~ is special in this case when variable is quoted (hence why it didn't work). It will put paths with ~ in single-quotes, so it can't expand on that! More info...

I thought about making a more verbose condition, but it didn't really seem worth it or necessary.

airblade commented 2 years ago

Oh, ok. I can't say I understand it fully. Bash... ¯\(ツ)

I presume the problem you ran into was the vim doesn't load plugins linked to an unexpanded tilde path? It's a bit surprising to me that it doesn't because I can cd through the link.

airblade commented 2 years ago

Anyway, thanks for the fix!

dezza commented 2 years ago

Correct yes it wouldn't, I was puzzled by the single quotes, but it makes sense after reading. If you typed it in interactively it would expand.

I think this solution is better than the long answers or a verbose conditional with extra steps.

I love voom btw, I can take a look in the future and see if I can clean it up.