Browse Source

pkgsearch: fix void support

DanielFGray 2 years ago
parent
commit
f8c1559fd8
1 changed files with 11 additions and 0 deletions
  1. 11
    0
      pkgsearch

+ 11
- 0
pkgsearch View File

@@ -110,6 +110,17 @@ arch() {
110 110
   install "$search -S" <<< "$packages"
111 111
 }
112 112
 
113
+void() {
114
+  local package_list packagename='{sub(/-[^\-]*$/, "", $2); print $2}'
115
+  package_list=$(xbps-query -Rs '' | sort)
116
+  fzf --bind='Ctrl-X:toggle-preview' \
117
+      --preview="p=\$(awk \"$packagename\" <<< {}); xbps-query -Rx \$p" \
118
+      --preview-window='up:hidden' \
119
+      --query="$1" <<< "$package_list" |
120
+    awk "$packagename" |
121
+    install 'xbps-install -S'
122
+}
123
+
113 124
 while true; do
114 125
   case "$1" in
115 126
     -r|--reverse)  reverse=1  ; shift ;;

Loading…
Cancel
Save