From f23cbd9f73379f5485a4a9460650d7d2ea85753d Mon Sep 17 00:00:00 2001 From: codefalling Date: Fri, 11 Dec 2015 11:03:55 +0800 Subject: [PATCH] fix empty history in gnome terminal --- plugins/percol/percol.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/percol/percol.plugin.zsh b/plugins/percol/percol.plugin.zsh index 91010bde9..c6adf4e1e 100644 --- a/plugins/percol/percol.plugin.zsh +++ b/plugins/percol/percol.plugin.zsh @@ -1,7 +1,7 @@ if which percol &> /dev/null; then function percol_select_history() { local tac - tac="tail -r" + which gtac &> /dev/null && tac="gtac" || { which tac &> /dev/null && tac="tac" || { tac="tail -r" } } BUFFER=$(fc -l -n 1 | eval $tac | percol --query "$LBUFFER") CURSOR=$#BUFFER zle -R -c