fix: cleaned up elvish and fish integrations for bin_dir
parent
4cc663fc60
commit
9407e0fd0d
|
|
@ -198,15 +198,8 @@
|
|||
}
|
||||
if (and (has-value $features path) (has-env GHOSTTY_BIN_DIR)) {
|
||||
# Check if the directory is already in PATH
|
||||
var path-contains-ghostty = $false
|
||||
for p $paths {
|
||||
if (eq $p $E:GHOSTTY_BIN_DIR) {
|
||||
set path-contains-ghostty = $true
|
||||
break
|
||||
}
|
||||
}
|
||||
if (not $path-contains-ghostty) {
|
||||
set paths = [$@paths $E:GHOSTTY_BIN_DIR]
|
||||
if (not (has-value $paths $E:GHOSTTY_BIN_DIR)) {
|
||||
set paths = [$E:GHOSTTY_BIN_DIR $@paths]
|
||||
}
|
||||
}
|
||||
if (and (has-value $features sudo) (not-eq "" $E:TERMINFO) (has-external sudo)) {
|
||||
|
|
|
|||
|
|
@ -63,10 +63,7 @@ function __ghostty_setup --on-event fish_prompt -d "Setup ghostty integration"
|
|||
|
||||
# Add Ghostty binary to PATH if the path feature is enabled
|
||||
if contains path $features; and test -n "$GHOSTTY_BIN_DIR"
|
||||
# Check if the directory is already in PATH
|
||||
if not contains -- "$GHOSTTY_BIN_DIR" $PATH
|
||||
set --global --export PATH $PATH "$GHOSTTY_BIN_DIR"
|
||||
end
|
||||
fish_add_path "$GHOSTTY_BIN_DIR"
|
||||
end
|
||||
|
||||
# When using sudo shell integration feature, ensure $TERMINFO is set
|
||||
|
|
|
|||
Loading…
Reference in New Issue