Nicer error message for zsh versions before 5.1
This commit is contained in:
parent
d6492264c7
commit
31dfee8a95
@ -27,6 +27,11 @@ fi
|
|||||||
[[ ! -r "$_ksi_file" ]] || 'builtin' 'source' '--' "$_ksi_file"
|
[[ ! -r "$_ksi_file" ]] || 'builtin' 'source' '--' "$_ksi_file"
|
||||||
} always {
|
} always {
|
||||||
if [[ -o 'interactive' && -n "${KITTY_SHELL_INTEGRATION-}" ]]; then
|
if [[ -o 'interactive' && -n "${KITTY_SHELL_INTEGRATION-}" ]]; then
|
||||||
|
'builtin' 'autoload' '--' 'is-at-least'
|
||||||
|
'is-at-least' "5.1" || {
|
||||||
|
builtin echo "ZSH ${ZSH_VERSION} is too old for kitty shell integration" > /dev/stderr
|
||||||
|
return
|
||||||
|
}
|
||||||
# ${(%):-%x} is the path to the current file.
|
# ${(%):-%x} is the path to the current file.
|
||||||
# On top of it we add :A:h to get the directory.
|
# On top of it we add :A:h to get the directory.
|
||||||
'builtin' 'typeset' _ksi_file="${${(%):-%x}:A:h}"/kitty-integration
|
'builtin' 'typeset' _ksi_file="${${(%):-%x}:A:h}"/kitty-integration
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user