Created
March 25, 2024 03:53
-
-
Save thingsiplay/7a25bb3d62845d1f0f88322a026e1b6b to your computer and use it in GitHub Desktop.
yay query preview
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/env bash | |
yay_preview() { | |
yay -Qqil "${1}" | |
} | |
export -f yay_preview | |
yay_preview_output() { | |
yay_preview "${1}" | less | |
echo "\$ yay -Qqi ${1}" | |
yay -Qqi "${1}" | |
} | |
export -f yay_preview_output | |
yay -Qq | | |
grep -E -- "${1}" | | |
fzf --preview 'yay_preview {}' \ | |
--no-sort \ | |
--reverse \ | |
--border rounded \ | |
--border-label ' [Query Packages] ' \ | |
--bind 'enter:execute(yay_preview_output {})' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment