Several new scripts added

This commit is contained in:
Alexander Gehrke 2020-07-29 14:58:50 +02:00
parent 1809ffacb3
commit cdbcc9692a
5 changed files with 82 additions and 0 deletions

28
void/xqq Executable file
View file

@ -0,0 +1,28 @@
#!/bin/zsh
zparseopts -D -E i=installed -installed=installed
if [[ $installed ]]; then
filter-installed() {
grep -e '^\[\*\]'
}
else
filter-installed() {
cat
}
fi
description=$(
xbps-query -Rs "$*" \
| filter-installed \
| fzf \
| cut -d' ' -f 2 \
| xargs xbps-query -R
)
{
grep '^pkgname:' <<<$description
grep '^pkgver:' <<<$description
grep '^short_desc:' <<<$description
grep -v '^pkgname:\|^pkgver:\|^short_desc:' <<<$description
}| sed -e 's/^\([^:]*:\)/\x1B[33m\1\x1B[0m/' | $PAGER