You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the word being completed is the command word, path_approx should only glob things that could be a valid command word: only absolute paths and things in $PATH, which are either executable or (if AUTO_CD is set) directories.
The text was updated successfully, but these errors were encountered:
path_approx was added by @Valodim in #115, alongside path_prefix. The latter has a clear use-case, but I honestly don't see why highlighting things that are similar to existing paths, but are not themselves valid paths, is useful at all. (By comparison, we don't highlight misspelled commands — for example, ifcofnig is red — and it wouldn't be useful to do so.)
To be honest, my hunch is that path_approx should simply be dropped, or at least made optional and disabled by default. But I'm open to the possibility that I'm missing some important use-case, in which case, I would love to be enlightened.
Hm. path_approx was one of these "hey that'd be cool maybe?" features. The use case is mild reassurance (i.e. other than a non-highlighted parameter) that a file does not already exist but a similar one does, which is usually a very distinct scenario from working with an actually existing file name. I admit it's not super important to have in any particular situation, but it has never annoyed me either.
I don't mind either way, feel free to keep or ditch it :)
(Spun off from #148)
When the word being completed is the command word,
path_approx
should only glob things that could be a valid command word: only absolute paths and things in $PATH, which are either executable or (ifAUTO_CD
is set) directories.The text was updated successfully, but these errors were encountered: