Previously the path preview misbehaved when typing dots on the first shell word (e.g. executing a script in a parent directory). This happened as the `(z)` parameter expansion flag does not expand to an array rather a scalar. Because of that, `[-1]` returns the last character. Work around this issue by prepending LBUFFER with a dummy word, so that it always contains at least 2 words.
4.8 KiB
4.8 KiB