hrsh7th / cmp-path

nvim-cmp source for path
MIT License
628 stars 60 forks source link

Fix #28 with trailing space detection #48

Closed litoj closed 2 years ago

litoj commented 2 years ago

We don't use dir names with spaces very often, but we surely never use dir names with trailing spaces. I reverted the last commit to replace it with a simpler solution - disallowing a space to be the last character in dir name (no ... /).

hrsh7th commented 2 years ago

Sorry. Please do not revert all of the last fixes.

litoj commented 2 years ago

Sorry, didn't think of that, fixed now.

hrsh7th commented 2 years ago

@JosefLitos I think this fix doesn't work with the following case, right?

 /usr/bin/java -jar ./|

The absolute path case is worked as expecetd but relative one doesn't.

litoj commented 2 years ago

I think noone will use that at the end of a folder name either, so it should be safe to disallow these two too. Although this breaks ../../. I will find a way around that shortly.

hrsh7th commented 2 years ago

I will check after work.