From ee433ef6e9b8ab2860ca93dd39ed110fc79bf60e Mon Sep 17 00:00:00 2001 From: brettanomyces Date: Sat, 13 Dec 2014 11:54:35 +1300 Subject: [PATCH] reverse history for fish shell --- install | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/install b/install index f912091..3176b27 100755 --- a/install +++ b/install @@ -294,8 +294,16 @@ function fzf_key_bindings rm -f $TMPDIR/fzf.result end + function __fzf_reverse + if which tac > /dev/null + tac $argv + else + tail -r $argv + end + end + function __fzf_ctrl_r - history | fzf +s +m > $TMPDIR/fzf.result + history | __fzf_reverse | fzf +s +m > $TMPDIR/fzf.result and commandline (cat $TMPDIR/fzf.result) commandline -f repaint rm -f $TMPDIR/fzf.result