jethrokuan / fzf

Ef-🐟-ient fish keybindings for fzf
MIT License
863 stars 65 forks source link

Reverse search does not preserve command order #56

Closed milesfrain closed 5 years ago

milesfrain commented 6 years ago

Fisherman fzf loses some functionality compared to official fzf. For example, reverse search does not maintain history order.

The critical missing line seems to be set -lx FZF_DEFAULT_OPTS "--height $FZF_TMUX_HEIGHT $FZF_DEFAULT_OPTS --tiebreak=index --bind=ctrl-r:toggle-sort $FZF_CTRL_R_OPTS +m"

Not sure if the above line should just be copied over into fisherman fzf __fzf_reverse_isearch, or if the entire contents of the original fzf-history-widget should be should be copied over.

https://github.com/fisherman/fzf/blob/c4e68b526e10e8e507e5bf2b2c900e8a190211db/functions/__fzf_reverse_isearch.fish#L1

https://github.com/junegunn/fzf/blob/eb3afc03b57a20d1062880efe8e000abceeba3ee/shell/key-bindings.fish#L38

jethrokuan commented 6 years ago

I am of the opinion that the options should belong to FZF_REVERSE_ISEARCH_OPTS, maybe we can set them as the default for FZF_REVERSE_ISEARCH_OPTS?