forked from sorin-ionescu/prezto
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial modifications for personal use
- Loading branch information
Showing
5 changed files
with
85 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
function prompt_wikimatze_precmd { | ||
git-info | ||
} | ||
|
||
function prompt_wikimatze_setup { | ||
setopt LOCAL_OPTIONS | ||
unsetopt XTRACE KSH_ARRAYS | ||
prompt_opts=(cr percent subst) | ||
|
||
# Load required functions. | ||
autoload -Uz add-zsh-hook | ||
|
||
# Add hook for calling git-info before each command. | ||
add-zsh-hook precmd prompt_wikimatze_precmd | ||
|
||
# Use extended color pallete if available. | ||
if [[ $TERM = *256color* || $TERM = *rxvt* ]]; then | ||
_prompt_mseri_colors=( | ||
"%F{81}" # Turquoise | ||
"%F{75}" # Pastel Cyan | ||
"%F{215}" # Light Orange | ||
"%F{166}" # Orange - not used | ||
"%F{119}" # Pastel Limegreen | ||
) | ||
else | ||
_prompt_mseri_colors=( | ||
"%F{cyan}" | ||
"%F{magenta}" | ||
"%F{yellow}" | ||
"%F{red}" | ||
"%F{green}" | ||
) | ||
fi | ||
|
||
# Set git-info parameters. | ||
zstyle ':prezto:module:git:info' verbose 'yes' | ||
zstyle ':prezto:module:git:info:ahead' format ' %%B%F{yellow}⬆%f%%b' | ||
zstyle ':prezto:module:git:info:behind' format ' %%B%F{yellow}⬇%f%%b' | ||
zstyle ':prezto:module:git:info:branch' format '%F{green}%b%f' | ||
zstyle ':prezto:module:git:info:stashed' format ' %%B%F{cyan}✭%f%%b' | ||
|
||
zstyle ':prezto:module:git:info:clean' format ' %F{green}✔%f' | ||
zstyle ':prezto:module:git:info:dirty' format ' %F{red}✗%f' | ||
zstyle ':prezto:module:git:info:untracked' format ' %%B%F{white}◼%f%%b' | ||
|
||
zstyle ':prezto:module:git:info:keys' format \ | ||
'prompt' ' %F{green}(%f$(coalesce "%b" "%p" "%c")${git_info[rprompt]}%s%F{green})%f' \ | ||
'rprompt' '%A%B%S%C%D%U%u' | ||
|
||
# Define prompts. | ||
PROMPT="${_prompt_mseri_colors[3]}%n%f@${_prompt_mseri_colors[2]}%m%f ${_prompt_mseri_colors[5]}%~%f"'${(e)git_info[prompt]}'" » " | ||
RPROMPT='' | ||
|
||
} | ||
|
||
prompt_wikimatze_setup "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters