v0.9.1
This commit is contained in:
parent
564a7b4c7f
commit
c8c65bf7c2
2
PKGBUILD
2
PKGBUILD
|
@ -1,6 +1,6 @@
|
||||||
# Maintainer: Eric Lay <ericlaytm@gmail.com>
|
# Maintainer: Eric Lay <ericlaytm@gmail.com>
|
||||||
pkgname=fuzzy-pkg-finder
|
pkgname=fuzzy-pkg-finder
|
||||||
pkgver=0.9
|
pkgver=0.9.1
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
pkgdesc="Simple cli command for using fzf to search and install packages"
|
pkgdesc="Simple cli command for using fzf to search and install packages"
|
||||||
arch=('x86_64' 'aarch64')
|
arch=('x86_64' 'aarch64')
|
||||||
|
|
|
@ -16,7 +16,7 @@ makepkg -sric
|
||||||
\
|
\
|
||||||
Usage:
|
Usage:
|
||||||
```
|
```
|
||||||
Syntax: fpf -[a|l|la|R|Ra|h]
|
Syntax: fpf -[a|l|la|R|o|h]
|
||||||
Defaults to Pacman if no options passed
|
Defaults to Pacman if no options passed
|
||||||
|
|
||||||
options:
|
options:
|
||||||
|
@ -24,5 +24,6 @@ a Search/List and install from AUR with Yay
|
||||||
l Search/List installed packages from official repo
|
l Search/List installed packages from official repo
|
||||||
la Search/List installed packages from AUR
|
la Search/List installed packages from AUR
|
||||||
R Search/List installed packages from official repos for removal
|
R Search/List installed packages from official repos for removal
|
||||||
|
o Search/List orphaned packages for removal
|
||||||
h Print this help screen.
|
h Print this help screen.
|
||||||
```
|
```
|
||||||
|
|
16
fpf
16
fpf
|
@ -6,7 +6,7 @@ Help() {
|
||||||
echo "Use fzf to search and install with Pacman and Yay"
|
echo "Use fzf to search and install with Pacman and Yay"
|
||||||
echo "Defaults to Pacman if no options passed"
|
echo "Defaults to Pacman if no options passed"
|
||||||
echo
|
echo
|
||||||
echo "Syntax: fpf -[a|l|la|R|h]"
|
echo "Syntax: fpf -[a|l|la|R|o|h]"
|
||||||
echo
|
echo
|
||||||
echo "options:"
|
echo "options:"
|
||||||
echo
|
echo
|
||||||
|
@ -18,6 +18,8 @@ Help() {
|
||||||
echo
|
echo
|
||||||
echo "R Search/List installed packages for removal"
|
echo "R Search/List installed packages for removal"
|
||||||
echo
|
echo
|
||||||
|
echo "o Search/List orphaned packages for removal"
|
||||||
|
echo
|
||||||
echo "h Print this help screen."
|
echo "h Print this help screen."
|
||||||
echo
|
echo
|
||||||
}
|
}
|
||||||
|
@ -72,9 +74,11 @@ AurInstalled() {
|
||||||
}
|
}
|
||||||
|
|
||||||
### ORPHANS
|
### ORPHANS
|
||||||
#Orphans() {
|
Orphans() {
|
||||||
|
sort <(pacman -Qtdq) > /tmp/orphaned
|
||||||
#}
|
echo "$(echo -e ' Select packages to remove\n (use TAB to toggle selection)'; cat /tmp/orphaned)" > /tmp/orphaned
|
||||||
|
cat /tmp/orphaned |fzf -q "$1" -e -m --preview 'cat <(pacman -Si {1} 2>/dev/null || yay -Qi {1}) <(pacman -Ql {1} | awk "{print \$2}")' --preview-window=65%:wrap --layout=reverse --marker='>>' --header-lines=2 --info=hidden --ansi --margin="2%,1%,2%,1%" --cycle | xargs -ro sudo pacman -Rsn
|
||||||
|
}
|
||||||
|
|
||||||
### MAIN
|
### MAIN
|
||||||
|
|
||||||
|
@ -102,10 +106,10 @@ else
|
||||||
-R|--remove)
|
-R|--remove)
|
||||||
Remove "$2"
|
Remove "$2"
|
||||||
;;
|
;;
|
||||||
-h|--help) #Usage // Help
|
-h|--help)
|
||||||
Help
|
Help
|
||||||
;;
|
;;
|
||||||
-*) #Error catching
|
-*)
|
||||||
echo "Invalid Usage"
|
echo "Invalid Usage"
|
||||||
Help
|
Help
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Reference in New Issue