mirror of
https://github.com/jimeh/zsh-peco-history.git
synced 2026-02-19 13:36:39 +00:00
Change command verification
Changed command verification because 'which' does sometimes produce an empty tac variable.
This commit is contained in:
@@ -8,8 +8,8 @@
|
||||
if which peco &> /dev/null; then
|
||||
function peco_select_history() {
|
||||
local tac
|
||||
(which gtac &> /dev/null && tac="gtac") || \
|
||||
(which tac &> /dev/null && tac="tac") || \
|
||||
((($+commands[gtac])) && tac="gtac") || \
|
||||
(($+commands[tac])) && tac="tac" || \
|
||||
tac="tail -r"
|
||||
BUFFER=$(fc -l -n 1 | eval $tac | \
|
||||
peco --layout=bottom-up --query "$LBUFFER")
|
||||
|
||||
Reference in New Issue
Block a user