From b3c5b1185c2cb485ce10e5fb60f67ddb7f5d4d09 Mon Sep 17 00:00:00 2001 From: ash Date: Fri, 17 Nov 2023 00:24:40 +0000 Subject: [PATCH] Improve resilience of shell integration for sudo in fish Running `sudo --version` will now not error out. --- .../fish/vendor_conf.d/kitty-shell-integration.fish | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 5f09988fb..60b9aeda4 100644 --- a/shell-integration/fish/vendor_conf.d/kitty-shell-integration.fish +++ b/shell-integration/fish/vendor_conf.d/kitty-shell-integration.fish @@ -121,7 +121,7 @@ function __ksi_schedule --on-event fish_prompt -d "Setup kitty integration after set is_sudoedit "y" break end - if not string match -r -q "^-" "$arg" and not string match -r -q "=" "$arg" + if not string match -r -q -- "^-" "$arg" and not string match -r -q -- "=" "$arg" break # reached the command end end