summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Song <chips@ksong.dev>2022-03-25 05:57:38 -0500
committerGitHub <noreply@github.com>2022-03-25 11:57:38 +0100
commit538329d9b406cd6358d0fe31d58e0c9f578ceffa (patch)
tree28a33f27a367eadd65378b8ab8fabda3426cdcd0
parentfdd295d96ae1324962a3db0b408c5968ec63620b (diff)
fix(init): Change Elvish init to `catch` for 0.18 (#3769)
-rw-r--r--README.md2
-rw-r--r--docs/README.md2
-rw-r--r--src/init/starship.elv2
3 files changed, 3 insertions, 3 deletions
diff --git a/README.md b/README.md
index 5361bcf45..edb9e10c3 100644
--- a/README.md
+++ b/README.md
@@ -298,7 +298,7 @@ Add the following to the end of `~/.elvish/rc.elv`:
eval (starship init elvish)
```
-Note: Only Elvish v0.17+ is supported
+Note: Only Elvish v0.18+ is supported
</details>
diff --git a/docs/README.md b/docs/README.md
index e519436f6..c9788ddc8 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -111,7 +111,7 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
#### Elvish
::: warning
- Only elvish v0.17 or higher is supported.
+ Only elvish v0.18 or higher is supported.
:::
Add the following to the end of `~/.elvish/rc.elv`:
diff --git a/src/init/starship.elv b/src/init/starship.elv
index e73bbcc51..2044cf552 100644
--- a/src/init/starship.elv
+++ b/src/init/starship.elv
@@ -11,7 +11,7 @@ fn starship-after-command-hook {|m|
} else {
try {
set cmd-status-code = $error[reason][exit-status]
- } except {
+ } catch {
# The error is from the built-in commands and they have no status code.
set cmd-status-code = 1
}