jhawthorn/fzy

Prompt gets displayed multiple times when on multiple line

demodulatingswan opened this issue · 0 comments

To test fzy with the following prompt:

Make your choice!
> 

I execute the following command:

ls | fzy -p "$(printf 'Make your choice!\n> ')"

The first line of the prompt will appear multiple times with each interaction with fzy.

The intended behaviour should be close to, but not the same as:

echo 'Make your choice!' > /dev/tty; ls | fzy -p '> '

with the relevent difference being that the entire prompt should be erased at the end of execution, not just the last line.

I'll look at the code to see if I can fix this bug myself.