From 3d528ef5ed5e81398f0dd8e9b00459c094c0b58d Mon Sep 17 00:00:00 2001 From: excalibur1234 Date: Sat, 27 Jan 2018 12:15:29 +0100 Subject: [PATCH] increase perceived interaction speed --- pacui | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pacui b/pacui index 60f05c2..c2653fb 100644 --- a/pacui +++ b/pacui @@ -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