lincheney / fzf-tab-completion

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

Any way to keep original visible until completions are displayed? #15

Closed kuremu closed 3 years ago

kuremu commented 3 years ago

Hi, this looks great.

In Bash (in urxvt and xterm), after typing a line and hitting tab for completion, I'm seeing "Loading matches..." replace the line before the results are displayed.

Could there be a way to disable this, and just leave the original line as is until the matches are loaded? I have tried removing the printf 'Loading matches...\\r' command at bash/fzf-bash-completion.sh:107, and the printf '\\r' that comes at the end of the function, but it only has the effect of causing the original line to disappear before the matches have loaded.

This usually occurs on the first completion attempt of a command, and occasionally on subsequent attempts.

Thanks

laur89 commented 3 years ago

Note the Loading matches...\\r has other ill effects, at least in urxvt: https://i.imgur.com/85CjDsa.png

Note we completed for bash there, but the trailing end of the message is still rendered (the dots are not actually on the prompt, they're just visible).

I suppose at the very least, there should be option to a) disable the loading message; b) change the loading message;

lincheney commented 3 years ago

i've merged in #18 and some other changes that may help with this, can you try it out? also take a look at https://github.com/lincheney/fzf-tab-completion#custom-loading-message which I just added. unfortunately there's no real way to stop bash from clearing the line, but you can try out the hack I mention in the README (however