From c320635c2994608fa08c24082ca0ee0c75518b40 Mon Sep 17 00:00:00 2001 From: Ankur Kothari Date: Fri, 27 Dec 2024 23:10:06 +1100 Subject: [PATCH] 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. --- src/shell-integration/elvish/lib/ghostty-integration.elv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shell-integration/elvish/lib/ghostty-integration.elv b/src/shell-integration/elvish/lib/ghostty-integration.elv index 3d2f4a632..af9b3ed7e 100644 --- a/src/shell-integration/elvish/lib/ghostty-integration.elv +++ b/src/shell-integration/elvish/lib/ghostty-integration.elv @@ -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~ } }