added date time variables
This commit is contained in:
parent
d173732f37
commit
f35a716430
|
@ -4,6 +4,6 @@
|
||||||
|
|
||||||
function retcode() {}
|
function retcode() {}
|
||||||
|
|
||||||
PROMPT=$'%# %{\e[0;34m%}%B[%b%{\e[0m%}%{\e[1;32m%}%n%{\e[1;30m%}@%{\e[0m%}%{\e[0;36m%}%m%{\e[0;34m%}%B]%b%{\e[0m%} - %b%{\e[0;34m%}%B[%b%{\e[1;37m%}%~%{\e[0;34m%}%B]%b%{\e[0m%} - %{\e[0;34m%}%B[%b%{\e[0;33m%}'%D{"%Y-%m-%d %I:%M:%S"}%b$'%{\e[0;34m%}%B]%b%{\e[0m%} %{\e[0;34m%}%B%B[%{\e[1;35m%}%?$(retcode)%{\e[0;34m%}%B]%{\e[0m%}%b %{\e[0;34m%}%B%B{%{\e[1;35m%}$(basename ${KUBECONFIG:-KUBECONFIG})%{\e[0;34m%}%B}%{\e[0m%}%
|
PROMPT=$'%# %{\e[0;34m%}%B[%b%{\e[0m%}%{\e[1;32m%}%n%{\e[1;30m%}@%{\e[0m%}%{\e[0;36m%}%m%{\e[0;34m%}%B]%b%{\e[0m%} - %b%{\e[0;34m%}%B[%b%{\e[1;37m%}%~%{\e[0;34m%}%B]%b%{\e[0m%} - %{\e[0;34m%}%B[%b%{\e[0;33m%}'%D{"%Y-%m-%d %I:%M:%S"}%b$'%{\e[0;34m%}%B]%b%{\e[0m%} %{\e[0;34m%}%B%B[%{\e[1;35m%}%?$(retcode)%{\e[0;34m%}%B]%{\e[0m%}%b ${KUBE_VARS}
|
||||||
'
|
'
|
||||||
|
|
||||||
|
|
4
zshrc
4
zshrc
|
@ -222,6 +222,10 @@ precmd() {
|
||||||
export _DATE_=$(date -u +%Y%m%d)
|
export _DATE_=$(date -u +%Y%m%d)
|
||||||
export _TIME_=$(date -u +%H%M%S)
|
export _TIME_=$(date -u +%H%M%S)
|
||||||
export _DTTS_="${_DATE_}T${_TIME_}Z"
|
export _DTTS_="${_DATE_}T${_TIME_}Z"
|
||||||
|
if [[ ! -z $KUBECONFIG ]]
|
||||||
|
then
|
||||||
|
export KUBE_VARS=$(basename $KUBECONFIG)
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# vim: sw=2 ts=8 si relativenumber number
|
# vim: sw=2 ts=8 si relativenumber number
|
||||||
|
|
Loading…
Reference in New Issue