summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathieu Ablasou <alexherbo2@gmail.com>2021-02-20 14:33:02 +0100
committerMathieu Ablasou <alexherbo2@gmail.com>2021-02-20 14:33:02 +0100
commita0875227feb25aa9aa46341723886f5b69a3d57d (patch)
treed00663859f2f9b31a32c345ce62bd097d9c88430
parent0858c0e50c6ca6d214fb088f052385a242548e83 (diff)
Configuration: Update Starship prompt
-rw-r--r--README.md23
1 files changed, 7 insertions, 16 deletions
diff --git a/README.md b/README.md
index 3578a79..6f53b7b 100644
--- a/README.md
+++ b/README.md
@@ -268,23 +268,14 @@ PS1='$(test "$IN_KAKOUNE_CONNECT" && printf 🐈)$ '
`~/.config/starship.toml`
``` toml
-[custom.kakoune_client]
+[custom.kakoune]
symbol = '🐈'
-command = 'printf "${KAKOUNE_CLIENT}@${KAKOUNE_SESSION}"'
-when = 'test -n "$KAKOUNE_SESSION" -a -n "$KAKOUNE_CLIENT"'
-shell = ['dash']
-description = 'Indicates that the current shell is connected to a Kakoune client'
-style = 'green italic'
-format = '[$symbol ($output )]($style)'
-
-[custom.kakoune_session]
-symbol = '🐈'
-command = 'printf "${KAKOUNE_SESSION}"'
-when = 'test -n "$KAKOUNE_SESSION" -a -z "$KAKOUNE_CLIENT"'
-shell = ['dash']
-description = 'Indicates that the current shell is connected to a Kakoune session'
-style = 'green italic'
-format = '[$symbol ($output )]($style)'
+command = 'printf "%s@%s" "$KAKOUNE_CLIENT" "$KAKOUNE_SESSION"'
+when = '[ "$KAKOUNE_SESSION" ] && [ "$KAKOUNE_CLIENT" ]'
+shell = ['sh']
+description = 'The current Kakoune session and client'
+style = 'green'
+format = '[$symbol $output]($style)'
```
[Starship]: https://starship.rs