Compare commits

...

3 Commits

Author SHA1 Message Date
Alex Jurkiewicz a7661292f5
Merge b336fa098a into 3e2053a934 2025-01-07 23:59:11 +01:00
Seyed Sajjad (Sina) Tak Tehrani 3e2053a934
fix(prompt): add support for AWS_SSO_PROFILE in AWS segment initialization (#2813)
- Updated `_p9k_prompt_aws_init` to include `AWS_SSO_PROFILE` in the condition for activating the AWS segment.
- Ensures compatibility with AWS SSO profiles in addition to other AWS environment variables.
2025-01-06 03:24:25 -08:00
Alex Jurkiewicz b336fa098a Adjust pyenv content
1. Remove a spurious space in several themes.
2. Add example for POWERLEVEL9K_PYENV_SHOW_ON_COMMAND
2023-10-12 10:00:09 +08:00
5 changed files with 17 additions and 5 deletions

View File

@ -999,6 +999,9 @@
typeset -g POWERLEVEL9K_PYENV_PROMPT_ALWAYS_SHOW=false
# If set to false, hide python version if it's equal to "system".
typeset -g POWERLEVEL9K_PYENV_SHOW_SYSTEM=true
# Show pyenv only when the command you are typing matches one of these strings.
# Tip: You might want to enable POWERLEVEL9K_PYENV_PROMPT_ALWAYS_SHOW above.
# typeset -g POWERLEVEL9K_PYENV_SHOW_ON_COMMAND='py*|pip*|poetry|virtualenv'
# Pyenv segment format. The following parameters are available within the expansion.
#
@ -1010,7 +1013,7 @@
# 1. Display just "$P9K_CONTENT" if it's equal to "$P9K_PYENV_PYTHON_VERSION" or
# starts with "$P9K_PYENV_PYTHON_VERSION/".
# 2. Otherwise display "$P9K_CONTENT $P9K_PYENV_PYTHON_VERSION".
typeset -g POWERLEVEL9K_PYENV_CONTENT_EXPANSION='${P9K_CONTENT}${${P9K_CONTENT:#$P9K_PYENV_PYTHON_VERSION(|/*)}:+ $P9K_PYENV_PYTHON_VERSION}'
typeset -g POWERLEVEL9K_PYENV_CONTENT_EXPANSION='${P9K_CONTENT}${${P9K_CONTENT:#$P9K_PYENV_PYTHON_VERSION(|/*)}:+$P9K_PYENV_PYTHON_VERSION}'
# Custom icon.
# typeset -g POWERLEVEL9K_PYENV_VISUAL_IDENTIFIER_EXPANSION='⭐'

View File

@ -974,6 +974,9 @@
typeset -g POWERLEVEL9K_PYENV_PROMPT_ALWAYS_SHOW=false
# If set to false, hide python version if it's equal to "system".
typeset -g POWERLEVEL9K_PYENV_SHOW_SYSTEM=true
# Show pyenv only when the command you are typing matches one of these strings.
# Tip: You might want to enable POWERLEVEL9K_PYENV_PROMPT_ALWAYS_SHOW above.
# typeset -g POWERLEVEL9K_PYENV_SHOW_ON_COMMAND='py*|pip*|poetry|virtualenv'
# Pyenv segment format. The following parameters are available within the expansion.
#
@ -985,7 +988,7 @@
# 1. Display just "$P9K_CONTENT" if it's equal to "$P9K_PYENV_PYTHON_VERSION" or
# starts with "$P9K_PYENV_PYTHON_VERSION/".
# 2. Otherwise display "$P9K_CONTENT $P9K_PYENV_PYTHON_VERSION".
typeset -g POWERLEVEL9K_PYENV_CONTENT_EXPANSION='${P9K_CONTENT}${${P9K_CONTENT:#$P9K_PYENV_PYTHON_VERSION(|/*)}:+ $P9K_PYENV_PYTHON_VERSION}'
typeset -g POWERLEVEL9K_PYENV_CONTENT_EXPANSION='${P9K_CONTENT}${${P9K_CONTENT:#$P9K_PYENV_PYTHON_VERSION(|/*)}:+$P9K_PYENV_PYTHON_VERSION}'
# Custom icon.
# typeset -g POWERLEVEL9K_PYENV_VISUAL_IDENTIFIER_EXPANSION='⭐'

View File

@ -974,6 +974,9 @@
typeset -g POWERLEVEL9K_PYENV_PROMPT_ALWAYS_SHOW=false
# If set to false, hide python version if it's equal to "system".
typeset -g POWERLEVEL9K_PYENV_SHOW_SYSTEM=true
# Show pyenv only when the command you are typing matches one of these strings.
# Tip: You might want to enable POWERLEVEL9K_PYENV_PROMPT_ALWAYS_SHOW above.
# typeset -g POWERLEVEL9K_PYENV_SHOW_ON_COMMAND='py*|pip*|poetry|virtualenv'
# Pyenv segment format. The following parameters are available within the expansion.
#
@ -985,7 +988,7 @@
# 1. Display just "$P9K_CONTENT" if it's equal to "$P9K_PYENV_PYTHON_VERSION" or
# starts with "$P9K_PYENV_PYTHON_VERSION/".
# 2. Otherwise display "$P9K_CONTENT $P9K_PYENV_PYTHON_VERSION".
typeset -g POWERLEVEL9K_PYENV_CONTENT_EXPANSION='${P9K_CONTENT}${${P9K_CONTENT:#$P9K_PYENV_PYTHON_VERSION(|/*)}:+ $P9K_PYENV_PYTHON_VERSION}'
typeset -g POWERLEVEL9K_PYENV_CONTENT_EXPANSION='${P9K_CONTENT}${${P9K_CONTENT:#$P9K_PYENV_PYTHON_VERSION(|/*)}:+$P9K_PYENV_PYTHON_VERSION}'
# Custom icon.
# typeset -g POWERLEVEL9K_PYENV_VISUAL_IDENTIFIER_EXPANSION='⭐'

View File

@ -1049,6 +1049,9 @@
typeset -g POWERLEVEL9K_PYENV_PROMPT_ALWAYS_SHOW=false
# If set to false, hide python version if it's equal to "system".
typeset -g POWERLEVEL9K_PYENV_SHOW_SYSTEM=true
# Show pyenv only when the command you are typing matches one of these strings.
# Tip: You might want to enable POWERLEVEL9K_PYENV_PROMPT_ALWAYS_SHOW above.
# typeset -g POWERLEVEL9K_PYENV_SHOW_ON_COMMAND='py*|pip*|poetry|virtualenv'
# Pyenv segment format. The following parameters are available within the expansion.
#
@ -1060,7 +1063,7 @@
# 1. Display just "$P9K_CONTENT" if it's equal to "$P9K_PYENV_PYTHON_VERSION" or
# starts with "$P9K_PYENV_PYTHON_VERSION/".
# 2. Otherwise display "$P9K_CONTENT $P9K_PYENV_PYTHON_VERSION".
typeset -g POWERLEVEL9K_PYENV_CONTENT_EXPANSION='${P9K_CONTENT}${${P9K_CONTENT:#$P9K_PYENV_PYTHON_VERSION(|/*)}:+ $P9K_PYENV_PYTHON_VERSION}'
typeset -g POWERLEVEL9K_PYENV_CONTENT_EXPANSION='${P9K_CONTENT}${${P9K_CONTENT:#$P9K_PYENV_PYTHON_VERSION(|/*)}:+$P9K_PYENV_PYTHON_VERSION}'
# Custom icon.
# typeset -g POWERLEVEL9K_PYENV_VISUAL_IDENTIFIER_EXPANSION='⭐'

View File

@ -1206,7 +1206,7 @@ prompt_aws() {
}
_p9k_prompt_aws_init() {
typeset -g "_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]"='${AWS_VAULT:-${AWSUME_PROFILE:-${AWS_PROFILE:-$AWS_DEFAULT_PROFILE}}}'
typeset -g "_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]"='${AWS_SSO_PROFILE:-${AWS_VAULT:-${AWSUME_PROFILE:-${AWS_PROFILE:-$AWS_DEFAULT_PROFILE}}}}'
}
################################################################