mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-12 01:52:31 +01:00
feat(scw): display the current profile in the prompt
This commit is contained in:
parent
5c9dc0cfdd
commit
23578143d7
1 changed files with 14 additions and 0 deletions
|
|
@ -60,3 +60,17 @@ function _scw_profiles() {
|
||||||
reply=($(scw_profiles))
|
reply=($(scw_profiles))
|
||||||
}
|
}
|
||||||
compctl -K _scw_profiles ssp
|
compctl -K _scw_profiles ssp
|
||||||
|
|
||||||
|
function scw_prompt_info() {
|
||||||
|
local _scw_to_show
|
||||||
|
|
||||||
|
if [[ -n "$SCW_PROFILE" ]]; then
|
||||||
|
_scw_to_show+="${ZSH_THEME_SCW_PROFILE_PREFIX="<scw:"}${SCW_PROFILE}${ZSH_THEME_SCW_PROFILE_SUFFIX=">"}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "$_scw_to_show"
|
||||||
|
}
|
||||||
|
|
||||||
|
if [[ "$SHOW_SCW_PROMPT" != false && "$RPROMPT" != *'$(scw_prompt_info)'* ]]; then
|
||||||
|
RPROMPT='$(scw_prompt_info)'"$RPROMPT"
|
||||||
|
fi
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue