Skip to content
This repository was archived by the owner on Aug 15, 2025. It is now read-only.

Commit 3d528ef

Browse files
author
excalibur1234
committed
increase perceived interaction speed
1 parent 2567971 commit 3d528ef

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pacui

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,10 @@ function func_m
233233
then
234234

235235
pacman -Qdt --color always
236-
# ask, whether to remove the displayed orphaned packages and save answer in "answer" variable:
237-
read -p $' \e[41m Do you want to remove these orphaned packages? [Y|n] \e[0m' answer
236+
# ask, whether to remove the displayed orphaned packages:
237+
echo -e " \e[41m Do you want to remove these orphaned packages? [Y|n] \e[0m"
238+
read -s -n1 answer # save user input in "answer" variable (only accept 1 character as input)
239+
238240
case ${answer:-y} in # if ENTER is pressed, the variable "answer" is empty. if "answer" is empty, its default value is "y".
239241
y|Y|yes|YES|Yes ) # do this, if "answer" is y or Y or yes or YES or Yes
240242
sudo pacman -Rsn $(pacman -Qqdt) --color always --noconfirm

0 commit comments

Comments
 (0)