Skip to content

Commit f51007d

Browse files
committed
fix: manual formatting pass to ensure consistency with existing patterns
1 parent 13032d8 commit f51007d

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

src/shell-integration/fish/vendor_conf.d/ghostty-shell-integration.fish

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -89,22 +89,22 @@ function __ghostty_setup --on-event fish_prompt -d "Setup ghostty integration"
8989
# SSH integration
9090
if test -n "$GHOSTTY_SSH_INTEGRATION"
9191
# Cache file for tracking hosts with terminfo installed
92-
set -l _ghostty_cache_file (string join / (test -n "$GHOSTTY_RESOURCES_DIR"; and echo "$GHOSTTY_RESOURCES_DIR"; or echo "$HOME/.config/ghostty") "terminfo_hosts")
92+
set --local _ghostty_cache_file (string join / (test -n "$GHOSTTY_RESOURCES_DIR"; and echo "$GHOSTTY_RESOURCES_DIR"; or echo "$HOME/.config/ghostty") "terminfo_hosts")
9393

9494
# Extract target host from SSH arguments
9595
function _ghostty_get_ssh_target
96-
set -l target ""
97-
set -l skip_next false
96+
set --local target ""
97+
set --local skip_next "false"
9898

9999
for arg in $argv
100100
if test "$skip_next" = "true"
101-
set skip_next false
101+
set skip_next "false"
102102
continue
103103
end
104104

105105
# Skip flags that take arguments
106-
if string match -qr '^-[bcDEeFIiJLlmOopQRSWw]$' -- "$arg"
107-
set skip_next true
106+
if string match -qr -- '^-[bcDEeFIiJLlmOopQRSWw]$' "$arg"
107+
set skip_next "true"
108108
continue
109109
end
110110

@@ -123,14 +123,14 @@ function __ghostty_setup --on-event fish_prompt -d "Setup ghostty integration"
123123

124124
# Check if host has terminfo installed
125125
function _ghostty_host_has_terminfo
126-
set -l target $argv[1]
126+
set --local target "$argv[1]"
127127
test -f "$_ghostty_cache_file"; and grep -qFx "$target" "$_ghostty_cache_file" 2>/dev/null
128128
end
129129

130130
# Add host to terminfo cache
131131
function _ghostty_cache_host
132-
set -l target $argv[1]
133-
set -l cache_dir (dirname "$_ghostty_cache_file")
132+
set --local target "$argv[1]"
133+
set --local cache_dir (dirname "$_ghostty_cache_file")
134134

135135
# Create cache directory if needed
136136
test -d "$cache_dir"; or mkdir -p "$cache_dir"
@@ -147,14 +147,14 @@ function __ghostty_setup --on-event fish_prompt -d "Setup ghostty integration"
147147
chmod 600 "$_ghostty_cache_file" 2>/dev/null
148148
end
149149

150-
# Wrap `ssh` command to provide Ghostty SSH integration.
150+
# Wrap `ssh` command to provide Ghostty SSH integration
151151
function ssh -d "Wrap ssh to provide Ghostty SSH integration"
152152
switch "$GHOSTTY_SSH_INTEGRATION"
153-
case term-only
153+
case "term-only"
154154
_ghostty_ssh_term-only $argv
155-
case basic
155+
case "basic"
156156
_ghostty_ssh_basic $argv
157-
case full
157+
case "full"
158158
_ghostty_ssh_full $argv
159159
case "*"
160160
# Unknown level, fall back to basic
@@ -187,7 +187,7 @@ function __ghostty_setup --on-event fish_prompt -d "Setup ghostty integration"
187187
end
188188

189189
# Execute with environment variables if any were set
190-
if test "$(count $env_vars)" -gt 0
190+
if test (count $env_vars) -gt 0
191191
env $env_vars ssh $argv
192192
else
193193
builtin command ssh $argv
@@ -196,7 +196,7 @@ function __ghostty_setup --on-event fish_prompt -d "Setup ghostty integration"
196196

197197
# Level: full - All features
198198
function _ghostty_ssh_full
199-
set -l target (_ghostty_get_ssh_target $argv)
199+
set --local target (_ghostty_get_ssh_target $argv)
200200

201201
# Check if we already know this host has terminfo
202202
if test -n "$target"; and _ghostty_host_has_terminfo "$target"

0 commit comments

Comments
 (0)