spaceship-prompt 4.16.2 → 4.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spaceship-prompt",
3
- "version": "4.16.2",
3
+ "version": "4.17.0",
4
4
  "description": "A Zsh prompt for Astronauts.",
5
5
  "files": [
6
6
  "lib",
@@ -0,0 +1,43 @@
1
+ #
2
+ # Gleam
3
+ #
4
+ # Gleam is a friendly language for building type-safe systems that scale!
5
+ # Link: https://gleam.run/
6
+
7
+ # ------------------------------------------------------------------------------
8
+ # Configuration
9
+ # ------------------------------------------------------------------------------
10
+
11
+ SPACESHIP_GLEAM_SHOW="${SPACESHIP_GLEAM_SHOW=true}"
12
+ SPACESHIP_GLEAM_ASYNC="${SPACESHIP_GLEAM_ASYNC=true}"
13
+ SPACESHIP_GLEAM_PREFIX="${SPACESHIP_GLEAM_PREFIX="$SPACESHIP_PROMPT_DEFAULT_PREFIX"}"
14
+ SPACESHIP_GLEAM_SUFFIX="${SPACESHIP_GLEAM_SUFFIX="$SPACESHIP_PROMPT_DEFAULT_SUFFIX"}"
15
+ SPACESHIP_GLEAM_SYMBOL="${SPACESHIP_GLEAM_SYMBOL="⭐ "}"
16
+ SPACESHIP_GLEAM_COLOR="${SPACESHIP_GLEAM_COLOR="#ff8cff"}"
17
+
18
+ # ------------------------------------------------------------------------------
19
+ # Section
20
+ # ------------------------------------------------------------------------------
21
+
22
+ # Show current version of Gleam
23
+ spaceship_gleam() {
24
+ [[ $SPACESHIP_GLEAM_SHOW == false ]] && return
25
+
26
+ # Return when gleam is not installed
27
+ spaceship::exists gleam || return
28
+
29
+ # Show Gleam status only for Gleam-specific folders
30
+ local is_gleam_project="$(spaceship::upsearch gleam.toml manifest.toml)"
31
+ [[ -n "$is_gleam_project" || -n *.gleam(#qN^/) ]] || return
32
+
33
+ local gleam_version="$(gleam --version 2>/dev/null | awk '{print $2}')"
34
+
35
+ [[ $gleam_version == "system" ]] && return
36
+
37
+ spaceship::section::v4 \
38
+ --color "$SPACESHIP_GLEAM_COLOR" \
39
+ --prefix "$SPACESHIP_GLEAM_PREFIX" \
40
+ --suffix "$SPACESHIP_GLEAM_SUFFIX" \
41
+ --symbol "$SPACESHIP_GLEAM_SYMBOL" \
42
+ "v$gleam_version"
43
+ }
package/spaceship.zsh CHANGED
@@ -8,7 +8,7 @@
8
8
 
9
9
  # Current version of Spaceship
10
10
  # Useful for issue reporting
11
- export SPACESHIP_VERSION='4.16.2'
11
+ export SPACESHIP_VERSION='4.17.0'
12
12
 
13
13
  # Set SPACESHIP_ROOT if it isn't defined yet or if the directory does
14
14
  # not exist anymore (e.g. after an update to a newer version)
@@ -82,6 +82,7 @@ if [ -z "$SPACESHIP_PROMPT_ORDER" ]; then
82
82
  zig # Zig section
83
83
  purescript # PureScript section
84
84
  erlang # Erlang section
85
+ gleam # Gleam section
85
86
  kubectl # Kubectl context section
86
87
  ansible # Ansible section
87
88
  terraform # Terraform workspace section