feat(pkg): Search core/extra/AUR repos

Auto-populates the command prompt with 'yay -S $selected_pkgs'.
This commit is contained in:
punkfairie 2024-03-13 21:43:07 -07:00
parent 262f2f95f5
commit e034ed520e
Signed by: punkfairie
GPG key ID: A86AF57F837E320F

View file

@ -0,0 +1,12 @@
#!/usr/bin/env fish
function pkgsearch -d "Search the core/extra/AUR repos for a package"
set -f res (yay -Slq | command fzf --multi --preview 'yay -Si {}' --height=90% --layout=reverse)
if test $status -eq 0
set -l pkgs (string join ' ' $res)
commandline --current-token --replace -- "yay -S $res"
end
commandline --function repaint
end