spaceship-prompt 3.15.0 → 3.16.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/CHANGELOG.md CHANGED
@@ -1,3 +1,31 @@
1
+ ## [3.16.3](https://github.com/spaceship-prompt/spaceship-prompt/compare/v3.16.2...v3.16.3) (2022-02-16)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * set proper message if no account ([#1099](https://github.com/spaceship-prompt/spaceship-prompt/issues/1099)) ([15d2279](https://github.com/spaceship-prompt/spaceship-prompt/commit/15d227994e003a9a3ddd30596f8a675acc212f29))
7
+
8
+ ## [3.16.2](https://github.com/spaceship-prompt/spaceship-prompt/compare/v3.16.1...v3.16.2) (2022-01-15)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * don't show docker section when using colima ([#1101](https://github.com/spaceship-prompt/spaceship-prompt/issues/1101)) ([9b6e88b](https://github.com/spaceship-prompt/spaceship-prompt/commit/9b6e88b0d2c1d76961c59c1f5476830a2ce44293))
14
+
15
+ ## [3.16.1](https://github.com/spaceship-prompt/spaceship-prompt/compare/v3.16.0...v3.16.1) (2021-11-05)
16
+
17
+
18
+ ### Bug Fixes
19
+
20
+ * fix aws section bug ([#1089](https://github.com/spaceship-prompt/spaceship-prompt/issues/1089)) ([642f645](https://github.com/spaceship-prompt/spaceship-prompt/commit/642f645d5f3d73504bd4c3045077c0354315c113))
21
+
22
+ # [3.16.0](https://github.com/spaceship-prompt/spaceship-prompt/compare/v3.15.0...v3.16.0) (2021-10-25)
23
+
24
+
25
+ ### Features
26
+
27
+ * **aws:** Add support to aws-vault ([#1078](https://github.com/spaceship-prompt/spaceship-prompt/issues/1078)) ([ca8e8f0](https://github.com/spaceship-prompt/spaceship-prompt/commit/ca8e8f0a7da7b84c0cdeca98aa8351a6cc1f48d2))
28
+
1
29
  # [3.15.0](https://github.com/spaceship-prompt/spaceship-prompt/compare/v3.14.1...v3.15.0) (2021-10-11)
2
30
 
3
31
 
package/LICENSE.md CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2021-2016 [Denys Dovhan](https://denysdovhan.com)
3
+ Copyright (c) 2022-2016 [Denys Dovhan](https://denysdovhan.com)
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -120,6 +120,7 @@ Spaceship is a minimalistic, powerful and extremely customizable [Zsh][zsh-url]
120
120
  - Optional exit-code of last command ([how to enable](./docs/options.md#exit-code-exit_code)).
121
121
  - Optional time stamps 12/24hr in format ([how to enable](./docs/options.md#time-time)).
122
122
  - Execution time of the last command if it exceeds the set threshold.
123
+ - Optional AWS now supports aws-vault ([aws-vault](https://github.com/99designs/aws-vault))
123
124
 
124
125
  Want more features? Please, [open an issue](https://github.com/spaceship-prompt/spaceship-prompt/issues/new/choose) or send pull request.
125
126
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spaceship-prompt",
3
- "version": "3.15.0",
3
+ "version": "3.16.3",
4
4
  "description": "A Zsh prompt for Astronauts.",
5
5
  "files": [
6
6
  "lib",
package/sections/aws.zsh CHANGED
@@ -22,16 +22,15 @@ SPACESHIP_AWS_COLOR="${SPACESHIP_AWS_COLOR="208"}"
22
22
  spaceship_aws() {
23
23
  [[ $SPACESHIP_AWS_SHOW == false ]] && return
24
24
 
25
- # Check if the AWS-cli is installed
26
- spaceship::exists aws || return
25
+ local profile=${AWS_VAULT:-$AWS_PROFILE}
27
26
 
28
27
  # Is the current profile not the default profile
29
- [[ -z $AWS_PROFILE ]] || [[ "$AWS_PROFILE" == "default" ]] && return
28
+ [[ -z $profile ]] || [[ "$profile" == "default" ]] && return
30
29
 
31
30
  # Show prompt section
32
31
  spaceship::section \
33
32
  "$SPACESHIP_AWS_COLOR" \
34
33
  "$SPACESHIP_AWS_PREFIX" \
35
- "${SPACESHIP_AWS_SYMBOL}$AWS_PROFILE" \
34
+ "${SPACESHIP_AWS_SYMBOL}${profile}" \
36
35
  "$SPACESHIP_AWS_SUFFIX"
37
36
  }
@@ -33,7 +33,7 @@ spaceship_docker_context() {
33
33
  # Docker contexts can be set using either the DOCKER_CONTEXT environment variable
34
34
  # or the `docker context use` command. `docker context ls` will show the selected
35
35
  # context in both cases. But we are not interested in the local "default" context.
36
- docker_remote_context=$(docker context ls --format '{{if .Current}}{{if and (ne .Name "default") (ne .Name "desktop-linux")}}{{.Name}}{{end}}{{end}}' 2>/dev/null)
36
+ docker_remote_context=$(docker context ls --format '{{if .Current}}{{if and (ne .Name "default") (ne .Name "desktop-linux") (ne .Name "colima")}}{{.Name}}{{end}}{{end}}' 2>/dev/null)
37
37
  [[ $? -ne 0 ]] && return
38
38
 
39
39
  docker_remote_context=$(echo $docker_remote_context | tr -d '\n')
@@ -29,6 +29,10 @@ spaceship_ibmcloud() {
29
29
  local ibmcloud_account=$(ibmcloud target | grep Account | awk '{print $2}')
30
30
  [[ -z $ibmcloud_account ]] && return
31
31
 
32
+ # If no account is targeted, the awk command will return "No", so we need to
33
+ # check for that and set it to the full message manually.
34
+ [[ "No" == $ibmcloud_account ]] && ibmcloud_account="No account targeted"
35
+
32
36
  spaceship::section \
33
37
  "$SPACESHIP_IBMCLOUD_COLOR" \
34
38
  "$SPACESHIP_IBMCLOUD_PREFIX" \
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='3.15.0'
10
+ export SPACESHIP_VERSION='3.16.3'
11
11
 
12
12
  # Common-used variable for new line separator
13
13
  NEWLINE='