lincheney / fzf-tab-completion

Tab completion using fzf
GNU General Public License v3.0
632 stars 40 forks source link

Bash - Incorrect completion after single dot #21

Closed tseeker closed 3 years ago

tseeker commented 3 years ago

Description

On Bash, when using a single dot followed by space as a shorthand to source and using tab completion, all entries in the list that appears have a dot instead of their first character. Selecting one of the entries indeed completes with a dot.

This behaviour is not observed if the initial dot is followed by two or more spaces; in that case, completion only works for the first directory level (that last part, however, is inadvertently solved by PR #20).

Reproduction

# At the top of the fzf-tab-completion directory
. <TAB>
# List containing '.sh' , '.eadline', '.git', '.ash', '.ICENSE', '.xample.svg' and '.EADME.md' appears

Environment

lincheney commented 3 years ago

the problem with . in the first character should be fixed in 864ea71fab3da698b14c4461c4d2f294855783c6 not sure what you mean by this bit though? if the initial dot is followed by two or more spaces; in that case, completion only works for the first directory level

tseeker commented 3 years ago

(I don't remember exactly as that was some time ago) I believe that, at one point, it worked when trying to complete a dot followed by 2 spaces followed by the start of a directory name, but it replaced the pair of spaces with a single space in the process, therefore preventing further completion from working.

lincheney commented 3 years ago

ok, yep, managed to reproduce the issue and it is indeed fixed in your PR #20