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.
This commit is contained in:
Jason Rayne
2025-06-16 13:51:13 -07:00
parent c70643404c
commit b07b3e4608

View File

@ -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 # When using sudo shell integration feature, ensure $TERMINFO is set
# and `sudo` is not already a function or alias # 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 # Wrap `sudo` command to ensure Ghostty terminfo is preserved
function sudo -d "Wrap sudo to preserve terminfo" 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 for arg in $argv
# Check if argument is '-e' or '--edit' (sudoedit flags) # Check if argument is '-e' or '--edit' (sudoedit flags)
if string match -q -- -e "$arg"; or string match -q -- --edit "$arg" if string match -q -- "-e" "$arg"; or string match -q -- "--edit" "$arg"
set --function sudo_has_sudoedit_flags yes set --function sudo_has_sudoedit_flags "yes"
break break
end end
# Check if argument is neither an option nor a key-value pair # 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 break
end end
end end
if test "$sudo_has_sudoedit_flags" = yes if test "$sudo_has_sudoedit_flags" = "yes"
command sudo $argv command sudo $argv
else else
command sudo TERMINFO="$TERMINFO" $argv command sudo TERMINFO="$TERMINFO" $argv