Add ZSH-Configuration file to mimic bashrc

This commit is contained in:
Talia 2021-02-18 10:12:06 +01:00
parent 8466195475
commit de65e6a7fd

25
zshrc Normal file
View file

@ -0,0 +1,25 @@
setopt prompt_subst
prompt='%(?.%F{green}.%F{red})λ%f '
export PROMPT_full='%B%F{magenta}%n%F{blue}@%F{magenta}%m%b %F{magenta}%~
'"$prompt"
export PROMPT_gitlong='$(gitprompt && echo -ne " ")%F5$(git log --oneline --no-decorate -1 2>/dev/null)
%F{cyan}$(gitpath)'"$prompt"
# export PS1tiny=
# export PS1nano=
# export PS1nogit=
# export PS1git=
export PROMPT=$PROMPT_full
prompt() {
case $1 in
(full)
export PROMPT=$PROMPT_full;;
(gitlong)
export PROMPT=$PROMPT_gitlong;;
(*)
export PROMPT=$PROMPT_full;;
esac
export PROMPT_set=$1
}
prompt $PROMPT_set