✨ feat(pkg): Search core/extra/AUR repos
Auto-populates the command prompt with 'yay -S $selected_pkgs'.
This commit is contained in:
parent
262f2f95f5
commit
e034ed520e
1 changed files with 12 additions and 0 deletions
12
.config/fish/functions/pkgsearch.fish
Normal file
12
.config/fish/functions/pkgsearch.fish
Normal 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
|
Loading…
Reference in a new issue