From 3c0a2e8bcb97b1dde97f5baddf384712e7f46725 Mon Sep 17 00:00:00 2001 From: xerus2000 <27jf@pm.me> Date: Wed, 23 Dec 2020 13:49:16 +0100 Subject: [PATCH] config/shell/arch: update yzf & co --- .config/shell/arch | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.config/shell/arch b/.config/shell/arch index 5379bb5..8a396ff 100644 --- a/.config/shell/arch +++ b/.config/shell/arch @@ -12,14 +12,14 @@ alias yayr='noglob yay -R' yzf() { query=$(test "$1" = "Q" && echo " -l") pos=$(test "$query" && echo 1 || echo 2) - yay --color always -$1$2 | sed "s/ /\t/g" | fzf --history=/var/tmp/fzf-history-yay --preview "echo {} | cut -f$pos | xargs yay --color always -$1 -i $query" | cut -f$pos + yay --color always -$1$2 | sed "s/ /\t/g" | fzf --tiebreak=length --history=/var/tmp/fzf-history-yay --bind='left-click:ignore' --preview "echo {} | cut -f$pos | xargs yay --color always -$1 -i $query" "${@:3}" | cut -f$pos } yas() { - pkg=$(yzf S l) - test "$pkg" && echo "Install $pkg..." && yay -S "$pkg" + pkg=$(yzf S l -q "$1" "${@:2}") + test "$pkg" && echo "Install $pkg..." && print -s "yay -S $pkg" && yay -S "$pkg" } yar() { - pkg=$(yzf Q) - test "$pkg" && echo "Removing $pkg..." && yay -R "$pkg" + pkg=$(yzf Q "" -q "$1" "${@:2}") + test "$pkg" && echo "Removing $pkg..." && print -s "yay -R $pkg" && yay -R "$pkg" }