fix use of bash builtin in elvish integration

`type` is a bash builtin and should not be used in elvish.

```
Exception: exec: "type": executable file not found in $PATH
  ghostty-integration.elv:120:60-71:   if (and (not $no-sudo) (not-eq "" $E:TERMINFO) (eq file (type -t sudo))) {
  ghostty-integration.elv:38:1-123:1:
```

We can use the elvish `has-external` function instead.
This commit is contained in:
Ankur Kothari
2024-12-27 23:10:06 +11:00
committed by GitHub
parent a8e5eef11c
commit c320635c29

View File

@ -117,7 +117,7 @@
set edit:before-readline = (conj $edit:before-readline $beam~)
set edit:after-readline = (conj $edit:after-readline {|_| block })
}
if (and (not $no-sudo) (not-eq "" $E:TERMINFO) (eq file (type -t sudo))) {
if (and (not $no-sudo) (not-eq "" $E:TERMINFO) (has-external sudo)) {
edit:add-var sudo~ $sudo-with-terminfo~
}
}