Skip to content

Commit

Permalink
increase perceived interaction speed
Browse files Browse the repository at this point in the history
  • Loading branch information
excalibur1234 committed Jan 27, 2018
1 parent 2567971 commit 3d528ef
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pacui
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,10 @@ function func_m
then

pacman -Qdt --color always
# ask, whether to remove the displayed orphaned packages and save answer in "answer" variable:
read -p $' \e[41m Do you want to remove these orphaned packages? [Y|n] \e[0m' answer
# ask, whether to remove the displayed orphaned packages:
echo -e " \e[41m Do you want to remove these orphaned packages? [Y|n] \e[0m"
read -s -n1 answer # save user input in "answer" variable (only accept 1 character as input)

case ${answer:-y} in # if ENTER is pressed, the variable "answer" is empty. if "answer" is empty, its default value is "y".
y|Y|yes|YES|Yes ) # do this, if "answer" is y or Y or yes or YES or Yes
sudo pacman -Rsn $(pacman -Qqdt) --color always --noconfirm
Expand Down

0 comments on commit 3d528ef

Please sign in to comment.