jethrokuan / fzf

Ef-🐟-ient fish keybindings for fzf
MIT License
861 stars 66 forks source link

Fix double escape of backslashes in history. #36

Closed milkypostman closed 7 years ago

milkypostman commented 7 years ago

On Fish 2.4.0 I have noticed that if \ appears in a command line entry, then when I would use __fzf_reverse_isearch then for an entry that was,

scp remote:\* ./

then the entry would show, and insert as,

scp remote:\\*

So I added an additional sed command that seemed to fix the issue.

milkypostman commented 7 years ago

Is it a problem with that version? I assumed that the other file was possibly a different format and didn't suffer the same problems.

Which version of fish used that file?

On Fri, Apr 14, 2017 at 07:09 Jethro Kuan notifications@github.com wrote:

@jethrokuan commented on this pull request.

LGTM, but would need the same change to the above line as well.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/fisherman/fzf/pull/36#pullrequestreview-32821184, or mute the thread https://github.com/notifications/unsubscribe-auth/AACUslXNOn7-BpmkZ46Hj27Ph--LguVKks5rv2HhgaJpZM4M8smf .

jethrokuan commented 7 years ago

According to this issue https://github.com/fish-shell/fish-shell/issues/862, fish 2.3.0 and earlier used that location. I don't think they changed the way fish stored history, so it probably suffers from the same issues.

jethrokuan commented 7 years ago

Actually looking at the latest commit on history.fish (history --null), seems multiline prompts are possible using the history builtin, removing the need for this manual parsing.

jethrokuan commented 7 years ago

Hi @milkypostman ,

I updated the plugin, and removed support for fish versions < 2.4.0. Let me know if it solves this issue.

P.S huge fan of your work in the Emacs area, thought your handle sounded familiar 😄

milkypostman commented 7 years ago

@jethrokuan thank you x2. the fix seems to be working great and glad to meet a MELPA user. i cannot take much credit now though because so many others are now maintaining what I started many years ago now :)