[zsh] Fix 'emulate: unknown argument -o' error on old zsh (#3465)

Fix #2094
This commit is contained in:
LangLangBart 2023-10-14 10:41:01 +02:00 committed by GitHub
parent de7ef7eace
commit 3e1735b06e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -70,7 +70,7 @@ fi
# control. There are several others that could wreck havoc if they are set
# to values we don't expect. With the following `emulate` command we
# sidestep this issue entirely.
'emulate' 'zsh' '-o' 'no_aliases'
'builtin' 'emulate' 'zsh' && 'builtin' 'setopt' 'no_aliases'
# This brace is the start of try-always block. The `always` part is like
# `finally` in lesser languages. We use it to *always* restore user options.

View File

@ -35,7 +35,7 @@ else
}
fi
'emulate' 'zsh' '-o' 'no_aliases'
'builtin' 'emulate' 'zsh' && 'builtin' 'setopt' 'no_aliases'
{