1
0
mirror of https://github.com/Tarrasch/zsh-autoenv.git synced 2024-11-22 07:20:59 +02:00

tests: _autoenv_ask_for_yes: only trap INT with Zsh 5.2+

This commit is contained in:
Daniel Hahler 2017-04-23 23:36:29 +02:00
parent 61faa9431a
commit 650ca1079a

View File

@ -241,7 +241,10 @@ _autoenv_ask_for_yes() {
# Handle/catch Ctrl-C and return, instead of letting it potentially abort the
# shell setup process.
setopt localtraps
autoload -Uz is-at-least
if is-at-least 5.2; then
trap 'return 1' INT
fi
read answer
if [[ $answer == "yes" ]]; then