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 {
292
292
else
293
293
_kctf_log "To create a cluster config, run \"kctf cluster create\""
294
294
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
296
301
}
297
302
298
303
function deactivate {
You can’t perform that action at this time.
0 commit comments