mirror of
https://github.com/Tarrasch/zsh-autoenv.git
synced 2024-11-25 16:31:00 +02:00
tests: _autoenv_ask_for_yes: only trap INT with Zsh 5.2+
This commit is contained in:
parent
61faa9431a
commit
650ca1079a
@ -241,7 +241,10 @@ _autoenv_ask_for_yes() {
|
|||||||
# Handle/catch Ctrl-C and return, instead of letting it potentially abort the
|
# Handle/catch Ctrl-C and return, instead of letting it potentially abort the
|
||||||
# shell setup process.
|
# shell setup process.
|
||||||
setopt localtraps
|
setopt localtraps
|
||||||
trap 'return 1' INT
|
autoload -Uz is-at-least
|
||||||
|
if is-at-least 5.2; then
|
||||||
|
trap 'return 1' INT
|
||||||
|
fi
|
||||||
|
|
||||||
read answer
|
read answer
|
||||||
if [[ $answer == "yes" ]]; then
|
if [[ $answer == "yes" ]]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user