excalibur1234 / pacui

Bash script providing advanced Pacman and Yay/Pikaur/Aurman/Pakku/Trizen/Pacaur/Pamac-cli functionality in a simple UI
GNU General Public License v3.0
168 stars 13 forks source link

Pressing Esc after selecting an item quits the app. #37

Closed ferdiebergado closed 6 years ago

ferdiebergado commented 6 years ago

Is it possible to accomplish the behavior that when pressing escape after selecting an item should go back to the main menu?

excalibur1234 commented 6 years ago

you are right that this behavior was lost with the recent addition of "bash strict mode", which quits the script whenever an error is encountered (and pressing ESC creates an error).

i try to remember to deactivate bash strict mode next time i do a release.

if you told me about this bug a couple of days earlier, i could have fixed it for the 1.10 release.

p.s.: if you want to deactivate strict mode in pacui yourself, simply comment the following lines out (this means you have to add a # symbol to the front of the line):

set -e                                                                              # exit script immediately, if any command exits with non-zero error code
set -u                                                                              # only allow previously defined variables
set -o pipefail                                                                     # if one command in a pipe fails, all fail (this is not default behavior!)
excalibur1234 commented 6 years ago

version 1.10.1 disabled bash strict mode.

this should solve your problem for good.