[a] Add package preview
This commit is contained in:
parent
36c24fbdd5
commit
45fbd57302
|
@ -3,10 +3,10 @@
|
||||||
GUI scripts for popular cli tools, based on dialog and fzf
|
GUI scripts for popular cli tools, based on dialog and fzf
|
||||||
|
|
||||||
## Scripts
|
## Scripts
|
||||||
a - for managing apt packages
|
- `a` - for managing apt packages
|
||||||
g - for managing git repo
|
- `g` - for managing git repo
|
||||||
s - for managing systemd services
|
- `s` - for managing systemd services
|
||||||
r - for running named commands from ~/.aliases.txt file
|
- `r` - for running named commands from ~/.aliases.txt file
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
Download .deb package from Releases, then install it
|
Download .deb package from Releases, then install it
|
||||||
|
|
2
a
2
a
|
@ -8,7 +8,7 @@ action=$(DIALOGRC=/tmp/.dialogrc dialog --stdout --erase-on-exit --menu "Choose
|
||||||
|
|
||||||
|
|
||||||
if [[ $action == "Install" || $action == "Remove" ]]; then
|
if [[ $action == "Install" || $action == "Remove" ]]; then
|
||||||
package=$(apt list 2>/dev/null | awk -F'/' 'NR>1{print $1}' | fzf)
|
package=$(apt-cache search '' | sort | cut --delimiter ' ' --fields 1 | fzf --multi --cycle --reverse --preview 'apt-cache show {1}')
|
||||||
sudo apt ${action,,} $package -y
|
sudo apt ${action,,} $package -y
|
||||||
elif [[ $action == "Update" || $action == "Upgrade" ]]; then
|
elif [[ $action == "Update" || $action == "Upgrade" ]]; then
|
||||||
sudo apt ${action,,} -y
|
sudo apt ${action,,} -y
|
||||||
|
|
Loading…
Reference in New Issue