File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -292,7 +292,12 @@ function _kctf_activate {
292292 else
293293 _kctf_log "To create a cluster config, run \"kctf cluster create\""
294294 fi
295- PS1="${PS1}${_KCTF_PROMPT_COLOR1}kCTF[ctf=${_KCTF_PROMPT_COLOR2}${KCTF_CTF_NAME}\$(_kctf_config_string)\$(_kctf_chal_string)${_KCTF_PROMPT_COLOR1}] >${_KCTF_PROMPT_COLOR_END} "
295+ if set -o | grep -E '^promptsubst\s+off' -q; then
296+ _kctf_log_warn "Prompt substitution is disabled. Please run 'setopt PROMPT_SUBST' before 'kctf/activate' for extra prompt information."
297+ PS1="${PS1}${_KCTF_PROMPT_COLOR1}kCTF[ctf=${_KCTF_PROMPT_COLOR2}${KCTF_CTF_NAME}${_KCTF_PROMPT_COLOR1}] >${_KCTF_PROMPT_COLOR_END} "
298+ else
299+ PS1="${PS1}${_KCTF_PROMPT_COLOR1}kCTF[ctf=${_KCTF_PROMPT_COLOR2}${KCTF_CTF_NAME}\$(_kctf_config_string)\$(_kctf_chal_string)${_KCTF_PROMPT_COLOR1}] >${_KCTF_PROMPT_COLOR_END} "
300+ fi
296301}
297302
298303function deactivate {
You can’t perform that action at this time.
0 commit comments