Fzf: Garbled (doubled) text when using CTRL+r in Bash

Created on 28 Sep 2016  路  11Comments  路  Source: junegunn/fzf

Dear all,

Can someone please explain to me why I use garbled (doubled) text when using Ctrl+r in Bash, select an entry and then press Return?

Thankfully,

-Robert

fzf

Most helpful comment

FYI: I've reported the bug on the bash issue tracker:
https://lists.gnu.org/archive/html/bug-bash/2017-08/msg00017.html

All 11 comments

Please fill in issue template when you create an issue. Did you check everything on the template?

Dear @junegunn,

Please see below.

<!-- Check all that apply [x] -->
- Category
    - [x] fzf binary
    - [ ] fzf-tmux script
    - [x] Key bindings
    - [ ] Completion
    - [ ] Vim
    - [ ] Neovim
    - [ ] Etc.
- OS
    - [x] Linux
    - [ ] Mac OS X
    - [ ] Windows
    - [ ] Etc.
- Shell
    - [x] bash
    - [ ] zsh
    - [ ] fish

Which linux distro are you running? What is the version of bash? I couldn't reproduce the problem with LXTerminal or gnome-terminal on Ubuntu 14.04.

Dear @junegunn,

I am running Ubuntu Unity 16.04, Bash 4.3.46(1) and GNOME Terminal 3.18.3.

-Robert

So is this really a bug inside bash and needs to be reported to the bash developers?
I have only encountered this issue when using fzf.

Sorry, I stopped using fzf and cannot longer comment.

FYI: I've reported the bug on the bash issue tracker:
https://lists.gnu.org/archive/html/bug-bash/2017-08/msg00017.html

Per the conversation on the Bash issue tracker (linked above), it seems like the consensus is that fzf is not outputting the text quite right. One solution is to terminate the line with a clear screen character, but this has the side effect of clearing the screen. See the thread for more detail. Thoughts?

I still think that bash is not working correctly here as we trigger redraw-current-line at the end of the binding. No? But it looks like we can trivially workaround the issue by triggering it before, instead of after, history-expand-line. So let me push the fix.

This indeed fixed the issue. Thanks @junegunn 馃惓

Sorry to pollute the comment history, but I just wanted to say thanks @junegunn for fixing this bug (and for fzf), this will help me about every 5 minutes every day, I can't believe I didn't notice this fix for a year! :heart:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

natemara picture natemara  路  3Comments

ahmedelgabri picture ahmedelgabri  路  3Comments

chrisamow picture chrisamow  路  3Comments

asilvadesigns picture asilvadesigns  路  3Comments

aleclarson picture aleclarson  路  3Comments