mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-09-05 19:08:17 +00:00
Use built-in functions for elvish (#7025)
Currently the elvish shell integration uses the `hostname` command, this may not exist on all systems and is somewhat redundant to rely on when elvish has an [`platform:hostname`](https://elv.sh/ref/platform.html#platform:hostname) function that can be used and will work across platform regardless of command availability. On top of this instead of directly calling the `pwd` function we can simply use the built-in [`$pwd`](https://elv.sh/ref/builtin.html#$pwd) variable that elvish gives us. This should prevent the shell integration from breaking due to external function availability.
This commit is contained in:
@@ -75,7 +75,8 @@
|
||||
}
|
||||
|
||||
fn report-pwd {
|
||||
printf "\e]7;file://%s%s\a" (hostname) (pwd)
|
||||
use platform
|
||||
printf "\e]7;file://%s%s\a" platform:hostname $pwd
|
||||
}
|
||||
|
||||
fn sudo-with-terminfo {|@args|
|
||||
|
Reference in New Issue
Block a user