From 74c56d69ac6f461194171748298a9ce242b5e545 Mon Sep 17 00:00:00 2001 From: pagedown Date: Mon, 28 Feb 2022 19:26:20 +0800 Subject: [PATCH] Also fall back to check the last known working version of fish --- .../fish/vendor_conf.d/kitty-shell-integration.fish | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/shell-integration/fish/vendor_conf.d/kitty-shell-integration.fish b/shell-integration/fish/vendor_conf.d/kitty-shell-integration.fish index c3017756a..9efa1fa0e 100644 --- a/shell-integration/fish/vendor_conf.d/kitty-shell-integration.fish +++ b/shell-integration/fish/vendor_conf.d/kitty-shell-integration.fish @@ -19,10 +19,10 @@ end status is-interactive || exit 0 not functions -q __ksi_schedule || exit 0 -# Check fish version 3.3.0+ efficiently and exit on outdated versions +# Check fish version 3.3.0+ efficiently and fallback to check the last working version 3.2.0, exit on outdated versions. # "Warning: Update fish to version 3.3.0+ to enable kitty shell integration.\n" -set -q fish_killring -or echo -en "\eP@kitty-print|V2FybmluZzogVXBkYXRlIGZpc2ggdG8gdmVyc2lvbiAzLjMuMCsgdG8gZW5hYmxlIGtpdHR5IHNoZWxsIGludGVncmF0aW9uLgo=\e\\" && exit 0 +set -q fish_killring || set -q status_generation || string match -qnv "3.1.*" "$version" +or echo -en "\eP@kitty-print|V2FybmluZzogVXBkYXRlIGZpc2ggdG8gdmVyc2lvbiAzLjMuMCsgdG8gZW5hYmxlIGtpdHR5IHNoZWxsIGludGVncmF0aW9uLgo=\e\\" && exit 0 || exit 0 function __ksi_schedule --on-event fish_prompt -d "Setup kitty integration after other scripts have run, we hope" functions --erase __ksi_schedule