Add ZSH-Configuration file to mimic bashrc
This commit is contained in:
parent
8466195475
commit
de65e6a7fd
1 changed files with 25 additions and 0 deletions
25
zshrc
Normal file
25
zshrc
Normal 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
|
Loading…
Reference in a new issue