1
0
Fork 0
mirror of https://github.com/zdharma-continuum/zinit-configs.git synced 2025-02-27 15:57:25 +01:00
zinit-configs/lainiwa/1st_config/.zsh/prompts.zsh

16 lines
384 B
Bash
Raw Normal View History

2019-06-20 10:50:14 +02:00
setopt PROMPT_SUBST # allow expansion in prompts
# https://github.com/agkozak/agkozak-zsh-theme
_is_ssh() {
[[ -n "${SSH_CONNECTION-}${SSH_CLIENT-}${SSH_TTY-}" ]]
}
_is_ssh && host='%F{red}@%F{yellow}%m' || host=''
export PS1="%B%F{yellow}%n${host}%F{red}: %F{green}%~ %F{red}%#%f%b "
export PS2="%_> "
export RPS1="%B%F{yellow}%(?..(%?%))%f%b"
unset -f _is_ssh
unset -v host