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.pull/7039/head
commit
f1472362af
|
|
@ -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|
|
||||
|
|
|
|||
Loading…
Reference in New Issue