From b07b3e4608cbbdd5a9134e2cbec8c69d1612501c Mon Sep 17 00:00:00 2001 From: Jason Rayne Date: Mon, 16 Jun 2025 13:51:13 -0700 Subject: [PATCH] fish: revert all formatting changes Keeps only functional additions for SSH integration wrapper, preserving original line breaks and indentation to minimize diff noise per maintainer feedback. --- .../fish/vendor_conf.d/ghostty-shell-integration.fish | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/shell-integration/fish/vendor_conf.d/ghostty-shell-integration.fish b/src/shell-integration/fish/vendor_conf.d/ghostty-shell-integration.fish index 482b03cf9..1f4f9832d 100644 --- a/src/shell-integration/fish/vendor_conf.d/ghostty-shell-integration.fish +++ b/src/shell-integration/fish/vendor_conf.d/ghostty-shell-integration.fish @@ -63,14 +63,14 @@ function __ghostty_setup --on-event fish_prompt -d "Setup ghostty integration" # When using sudo shell integration feature, ensure $TERMINFO is set # and `sudo` is not already a function or alias - if contains sudo $features; and test -n "$TERMINFO"; and test file = (type -t sudo 2> /dev/null; or echo "x") + if contains sudo $features; and test -n "$TERMINFO"; and test "file" = (type -t sudo 2> /dev/null; or echo "x") # Wrap `sudo` command to ensure Ghostty terminfo is preserved function sudo -d "Wrap sudo to preserve terminfo" - set --function sudo_has_sudoedit_flags no + set --function sudo_has_sudoedit_flags "no" for arg in $argv # Check if argument is '-e' or '--edit' (sudoedit flags) - if string match -q -- -e "$arg"; or string match -q -- --edit "$arg" - set --function sudo_has_sudoedit_flags yes + if string match -q -- "-e" "$arg"; or string match -q -- "--edit" "$arg" + set --function sudo_has_sudoedit_flags "yes" break end # Check if argument is neither an option nor a key-value pair @@ -78,7 +78,7 @@ function __ghostty_setup --on-event fish_prompt -d "Setup ghostty integration" break end end - if test "$sudo_has_sudoedit_flags" = yes + if test "$sudo_has_sudoedit_flags" = "yes" command sudo $argv else command sudo TERMINFO="$TERMINFO" $argv