spaceship-prompt 4.22.1 → 4.22.3

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/README.md CHANGED
@@ -94,11 +94,11 @@ Before we begin, let's make sure you have the following installed:
94
94
 
95
95
  - [Zsh](http://www.zsh.org/) (v5.2 or recent) must be installed. Run the following command to check your version of Zsh:
96
96
  ```zsh
97
- echo $ZSH_VERSION #> 5.8.1
97
+ echo $ZSH_VERSION # 5.8.1
98
98
  ```
99
99
  - [Powerline Font](https://github.com/powerline/fonts) or [Nerd Font](https://www.nerdfonts.com/) (even better) must be installed and used in your terminal. [Fira Code](https://github.com/tonsky/FiraCode) is a popular choice. To check if Powerline Font works for you, run:
100
100
  ```zsh
101
- echo -e "\xee\x82\xa0" #>
101
+ echo -e "\xee\x82\xa0" #
102
102
  ```
103
103
 
104
104
  ## 🚀 Installation
package/lib/extract.zsh CHANGED
@@ -23,11 +23,11 @@ spaceship::extract::python::json() {
23
23
 
24
24
  spaceship::extract::python::toml() {
25
25
  local file=$1; shift
26
- local import py_version="${(@)$(python3 -V 2>&1)[2]}"
26
+ local import py_version=${(@)$(python3 -V 2>&1)[2]}
27
27
  autoload is-at-least
28
28
  # Python 3.11 added tomllib in the stdlib.
29
29
  # Previous versions require the tomli package
30
- if is-at-least 3.11 "$py_version" ]]; then
30
+ if is-at-least 3.11 "$py_version"; then
31
31
  import=tomllib
32
32
  else
33
33
  import=tomli
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spaceship-prompt",
3
- "version": "4.22.1",
3
+ "version": "4.22.3",
4
4
  "description": "A Zsh prompt for Astronauts.",
5
5
  "files": [
6
6
  "lib",
@@ -26,7 +26,7 @@ spaceship_dotnet() {
26
26
  [[ $SPACESHIP_DOTNET_SHOW == false ]] && return
27
27
 
28
28
  local is_dotnet_project="$(spaceship::upsearch project.json global.json paket.dependencies)"
29
- [[ -n "$is_dotnet_project" || -n *.(cs|fs|x)proj(#qN^/) || -n *.sln(#qN^/) ]] || return
29
+ [[ -n "$is_dotnet_project" || -n *.(cs|fs|x)proj(#qN^/) || -n *.sln(x|)(#qN^/) ]] || return
30
30
 
31
31
  spaceship::exists dotnet || return
32
32
 
@@ -74,10 +74,12 @@ spaceship_package::cargo() {
74
74
  spaceship::upsearch -s Cargo.toml || return
75
75
 
76
76
  # Handle missing field `version` in Cargo.toml.
77
- # `cargo pkgid` need Cargo.lock exists too. If it does't, do not show package version
77
+ # `cargo pkgid` needs Cargo.lock to exist too. If it doesn't, do not show package version
78
78
  # https://github.com/spaceship-prompt/spaceship-prompt/pull/617
79
- local pkgid=$(cargo pkgid 2>&1)
80
- echo "$pkgid" | grep -q "error:" && return
79
+ local pkgid
80
+ if ! pkgid=$(cargo pkgid 2>&1); then
81
+ return
82
+ fi
81
83
  echo "${pkgid##*\#}"
82
84
  }
83
85
 
package/sections/ruby.zsh CHANGED
@@ -30,11 +30,13 @@ spaceship_ruby() {
30
30
  local ruby_version
31
31
 
32
32
  if spaceship::exists rvm-prompt; then
33
- ruby_version=$(rvm-prompt i v g)
33
+ ruby_version=$(rvm-prompt i v g 2>/dev/null)
34
34
  elif spaceship::exists chruby; then
35
- ruby_version=$(chruby | sed -n -e 's/ \* //p')
35
+ ruby_version=$(chruby 2>/dev/null | sed -n -e 's/ \* //p')
36
36
  elif spaceship::exists rbenv; then
37
- ruby_version=$(rbenv version-name)
37
+ ruby_version=$(rbenv version-name 2>/dev/null)
38
+ elif spaceship::exists mise; then
39
+ ruby_version=$(mise current ruby 2>/dev/null)
38
40
  elif spaceship::exists asdf; then
39
41
  local asdf_output
40
42
  if asdf_output=$(asdf current --no-header ruby 2>/dev/null) && [[ -n "$asdf_output" ]]; then
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.22.1'
11
+ export SPACESHIP_VERSION='4.22.3'
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)