spaceship-prompt 4.0.0 → 4.1.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/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ # [4.1.0](https://github.com/spaceship-prompt/spaceship-prompt/compare/v4.0.0...v4.1.0) (2022-09-02)
2
+
3
+
4
+ ### Features
5
+
6
+ * **bun:** Add Bun section ([83ce0ee](https://github.com/spaceship-prompt/spaceship-prompt/commit/83ce0ee893757aee1c41b11c5433849a4c9de61d))
7
+
1
8
  # [4.0.0](https://github.com/spaceship-prompt/spaceship-prompt/compare/v3.16.7...v4.0.0) (2022-09-01)
2
9
 
3
10
 
package/README.md CHANGED
@@ -17,7 +17,7 @@
17
17
  alt="NPM Version" />
18
18
  </a>
19
19
 
20
- <a href="https://githucom/spaceship-prompt/spaceship-prompt/actions">
20
+ <a href="https://github.com/spaceship-prompt/spaceship-prompt/actions">
21
21
  <img src="https://img.shields.io/github/workflow/status/spaceship-prompt/spaceship-prompt/ci?style=flat-square"
22
22
  alt="GitHub Workflow Status" />
23
23
  </a>
@@ -163,7 +163,7 @@ This command will download Spaceship. It will also ask you to source Spaceship i
163
163
  Add Spaceship to your `.zimrc`:
164
164
 
165
165
  ```zsh
166
- zmodule spaceship-prompt/spaceship-prompt --name spaceship
166
+ zmodule spaceship-prompt/spaceship-prompt --name spaceship --no-submodules
167
167
  ```
168
168
 
169
169
  Then install Spaceship:
@@ -226,7 +226,6 @@ Add the following to your `plugins.toml` file (open it with `sheldon edit`):
226
226
  [plugins.spaceship]
227
227
  github = "spaceship-prompt/spaceship-prompt"
228
228
  ```
229
- </details>
230
229
 
231
230
  Or run the following to automatically add it:
232
231
 
@@ -252,8 +251,7 @@ makepkg -si
252
251
  If none of the above methods works for you, you can install Spaceship manually.
253
252
 
254
253
  1. Clone this repo somewhere, for example to `$HOME/.zsh/spaceship`.
255
- 2. Add the path of the cloned repo to `$fpath` in `$HOME/.zshrc`.
256
- 3. Activate Spaceship prompt by `promptinit`.
254
+ 2. Source Spaceship in your `~/.zshrc`.
257
255
 
258
256
  ### Example
259
257
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spaceship-prompt",
3
- "version": "4.0.0",
3
+ "version": "4.1.0",
4
4
  "description": "A Zsh prompt for Astronauts.",
5
5
  "files": [
6
6
  "lib",
@@ -0,0 +1,41 @@
1
+ #
2
+ # Bun
3
+ #
4
+ # Bun is a fast all-in-one JavaScript runtime
5
+ # Link: https://bun.sh/
6
+
7
+ # ------------------------------------------------------------------------------
8
+ # Configuration
9
+ # ------------------------------------------------------------------------------
10
+
11
+ SPACESHIP_BUN_SHOW="${SPACESHIP_BUN_SHOW=true}"
12
+ SPACESHIP_BUN_ASYNC="${SPACESHIP_BUN_ASYNC=true}"
13
+ SPACESHIP_BUN_PREFIX="${SPACESHIP_BUN_PREFIX="$SPACESHIP_PROMPT_DEFAULT_PREFIX"}"
14
+ SPACESHIP_BUN_SUFFIX="${SPACESHIP_BUN_SUFFIX="$SPACESHIP_PROMPT_DEFAULT_SUFFIX"}"
15
+ SPACESHIP_BUN_SYMBOL="${SPACESHIP_BUN_SYMBOL="🍞 "}"
16
+ SPACESHIP_BUN_COLOR="${SPACESHIP_BUN_COLOR="#fbf0df"}"
17
+
18
+ # ------------------------------------------------------------------------------
19
+ # Section
20
+ # ------------------------------------------------------------------------------
21
+
22
+ # Show current version of Haskell Tool Stack.
23
+ spaceship_bun() {
24
+ [[ $SPACESHIP_BUN_SHOW == false ]] && return
25
+
26
+ # Find Bun-specific files or return
27
+ spaceship::upsearch -s bun.lockb bunfig.toml || return
28
+
29
+ # Find Bun binary
30
+ spaceship::exists bun || return
31
+
32
+ # Get Bun version
33
+ local bun_version=$(bun --version)
34
+
35
+ spaceship::section \
36
+ --color "$SPACESHIP_BUN_COLOR" \
37
+ --prefix "$SPACESHIP_BUN_PREFIX" \
38
+ --suffix "$SPACESHIP_BUN_SUFFIX" \
39
+ --symbol "$SPACESHIP_BUN_SYMBOL" \
40
+ "v$bun_version"
41
+ }
@@ -33,6 +33,8 @@ spaceship_elixir() {
33
33
  elixir_version="${ELIXIR_VERSION}"
34
34
  elif spaceship::exists exenv; then
35
35
  elixir_version=$(exenv version-name)
36
+ elif spaceship::exists asdf; then
37
+ elixir_version=${$(asdf current elixir)[2]}
36
38
  fi
37
39
 
38
40
  if [[ $elixir_version == "" ]]; then
package/spaceship.zsh CHANGED
@@ -7,7 +7,7 @@
7
7
 
8
8
  # Current version of Spaceship
9
9
  # Useful for issue reporting
10
- export SPACESHIP_VERSION='4.0.0'
10
+ export SPACESHIP_VERSION='4.1.0'
11
11
 
12
12
  # Determination of Spaceship working directory
13
13
  # https://git.io/vdBH7
@@ -44,6 +44,7 @@ if [ -z "$SPACESHIP_PROMPT_ORDER" ]; then
44
44
  hg # Mercurial section (hg_branch + hg_status)
45
45
  package # Package version
46
46
  node # Node.js section
47
+ bun # Bun section
47
48
  ruby # Ruby section
48
49
  python # Python section
49
50
  elm # Elm section