spaceship-prompt 4.22.2 → 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/package.json +1 -1
- package/sections/package.zsh +5 -3
- package/sections/ruby.zsh +5 -3
- package/spaceship.zsh +1 -1
package/package.json
CHANGED
package/sections/package.zsh
CHANGED
|
@@ -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`
|
|
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
|
|
80
|
-
|
|
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.
|
|
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)
|