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
There, fish could see that file1.py has been provided earlier.
As it makes no sense to repeat the same file name, fish could auto-suggest file1_test.py.
The text was updated successfully, but these errors were encountered:
$ seq 1 5 >one
$ seq 1 2 10 >two
$ cat one two two |sort|uniq-u
2
4
Suppose you have another file two_something in the same directory, then Fish auto-completing two the second time to two_something would make it harder to select just two.
Yes, this isn't something that could be enabled for all completions - there would need to be a way to opt-out or opt-in (I think opt-out might be okay for file-completion).
It also can't be done for all kinds of completions in general, since e.g. options might be specified multiple times (rather common for "-v" or "--verbose" options).
Doing it correctly would also be suprisingly hard - since filenames are almost completely unrestricted on UNIXy systems, and since there's quite a variety of cases in which something that looks like a filename may appear in a different context. Long story short: This would pretty much require something like #478.
For suggestions, however, which don't need to be 100% correct - only very likely to be, I think it'd be okay to enable, even without an option to disable.
There are file1.py and file1_test.py only.
hg add file1.py file1…
There, fish could see that file1.py has been provided earlier.
As it makes no sense to repeat the same file name, fish could auto-suggest file1_test.py.
The text was updated successfully, but these errors were encountered: