From de65e6a7fd8e0f9321f9fb10c402357150bf80aa Mon Sep 17 00:00:00 2001 From: DarkWiiPlayer Date: Thu, 18 Feb 2021 10:12:06 +0100 Subject: [PATCH] Add ZSH-Configuration file to mimic bashrc --- zshrc | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 zshrc diff --git a/zshrc b/zshrc new file mode 100644 index 0000000..31de64b --- /dev/null +++ b/zshrc @@ -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