2024-04-14 18:41:15 -07:00
|
|
|
#!/usr/bin/env fish
|
|
|
|
|
2024-09-30 18:16:13 -07:00
|
|
|
function pkgsearch -d "Search the core/extra/AUR repos for a package" -a search
|
|
|
|
set -f query ""
|
|
|
|
|
|
|
|
if set -q search
|
2024-09-30 18:18:52 -07:00
|
|
|
set query "--query=$search"
|
2024-09-30 18:16:13 -07:00
|
|
|
end
|
|
|
|
|
|
|
|
set -f res (yay -Slq | command fzf --multi --preview 'yay -Si {}' --height=90% --layout=reverse "$query")
|
2024-04-14 18:41:15 -07:00
|
|
|
|
|
|
|
if test $status -eq 0
|
|
|
|
set -l pkgs (string join ' ' $res)
|
|
|
|
commandline --current-token --replace -- "yay -S $res"
|
|
|
|
end
|
|
|
|
|
|
|
|
commandline --function repaint
|
|
|
|
end
|