-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
702 additions
and
0 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,53 @@ | ||
VIRTUAL_ENV_DISABLE_PROMPT=true | ||
|
||
if zeesh-plugin-enabled vcs-info; then | ||
export VCS_INFO_BRANCH_FMT='%b' | ||
|
||
export VCS_INFO_GIT_ACTION_FMT='%F{magenta}‹%b%c%u%0.10i %a%m%s›%f' | ||
export VCS_INFO_GIT_FMT='%F{magenta}‹%b%c%u%0.10i%m%s›%f' | ||
|
||
export VCS_INFO_HG_ACTION_FMT='%F{magenta}‹%b%c%u %i %a %m%s›%f' | ||
export VCS_INFO_HG_FMT='%F{magenta}‹%b%c%u %i %m%s›%f' | ||
|
||
export VCS_INFO_HG_BOOKMARK_FMT='' | ||
export VCS_INFO_HG_REV_FMT='%r' | ||
|
||
export VCS_INFO_STAGED_FMT='+' | ||
export VCS_INFO_UNSTAGED_FMT='!' | ||
export VCS_INFO_TIMESINCE_FMT='$s' | ||
|
||
source ~/.zsh/plugins/vcs-info/style.zsh | ||
fi | ||
|
||
_prompt() { | ||
local s="%F{magenta}%B%n%b%f%F{magenta}@%f%F{magenta}%B%m%f%b %F{blue}%B${PWD/$HOME/~}%b%f" | ||
|
||
# display vcs info | ||
if [ "$vcs_info_msg_0_" ]; then | ||
s="$s $vcs_info_msg_0_" | ||
fi | ||
|
||
# split | ||
s="$s\n" | ||
|
||
# print virtualenv name if active | ||
if [ $VIRTUAL_ENV ]; then | ||
s="$s%F{magenta}${${(s:/:)VIRTUAL_ENV}[-1]}%f" | ||
fi | ||
|
||
echo -e "$s%F{magenta}›%f " | ||
} | ||
|
||
_rprompt() { | ||
# print return code if non-zero | ||
local rc=$? | ||
|
||
if [[ $rc != 0 ]]; then | ||
local s="%F{red}% $rc!%f" | ||
fi | ||
|
||
echo -e $s | ||
} | ||
|
||
PROMPT='$(_prompt)' | ||
RPROMPT='$(_rprompt)' |
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,53 @@ | ||
VIRTUAL_ENV_DISABLE_PROMPT=true | ||
|
||
if zeesh-plugin-enabled vcs-info; then | ||
export VCS_INFO_BRANCH_FMT='%b' | ||
|
||
export VCS_INFO_GIT_ACTION_FMT='%F{magenta}‹%s %b%m %0.10i%c%u %a›%f' | ||
export VCS_INFO_GIT_FMT='%F{magenta}‹%s %b%m %0.10i%c%u›%f' | ||
|
||
export VCS_INFO_HG_ACTION_FMT='%F{magenta}‹%s %b%m %i%c%u %a›%f' | ||
export VCS_INFO_HG_FMT='%F{magenta}‹%s %b%m %i%c%u›%f' | ||
|
||
export VCS_INFO_HG_BOOKMARK_FMT='' | ||
export VCS_INFO_HG_REV_FMT='%r' | ||
|
||
export VCS_INFO_STAGED_FMT='+' | ||
export VCS_INFO_UNSTAGED_FMT='!' | ||
export VCS_INFO_TIMESINCE_FMT='$s' | ||
|
||
source ~/.zsh/plugins/vcs-info/style.zsh | ||
fi | ||
|
||
_prompt() { | ||
local s="%F{magenta}%B%n%b%f%F{magenta}@%f%F{magenta}%B%m%f%b %F{blue}%B${PWD/$HOME/~}%b%f" | ||
|
||
# display vcs info | ||
if [ "$vcs_info_msg_0_" ]; then | ||
s="$s $vcs_info_msg_0_" | ||
fi | ||
|
||
# split | ||
s="$s\n" | ||
|
||
# print virtualenv name if active | ||
if [ $VIRTUAL_ENV ]; then | ||
s="$s%F{magenta}${${(s:/:)VIRTUAL_ENV}[-1]}%f" | ||
fi | ||
|
||
echo -e "$s%F{magenta}›%f " | ||
} | ||
|
||
_rprompt() { | ||
# print return code if non-zero | ||
local rc=$? | ||
|
||
if [[ $rc != 0 ]]; then | ||
local s="%F{red}% $(emoticon) $rc!%f" | ||
fi | ||
|
||
echo -e $s | ||
} | ||
|
||
PROMPT='$(_prompt)' | ||
RPROMPT='$(_rprompt)' |
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,51 @@ | ||
VIRTUAL_ENV_DISABLE_PROMPT=true | ||
|
||
if zeesh-plugin-enabled vcs-info; then | ||
export VCS_INFO_BRANCH_FMT='%b' | ||
|
||
export VCS_INFO_GIT_ACTION_FMT='%F{magenta}%a%f on %F{magenta}%b%m%f at %F{magenta}%0.10i%c%u %a%f' | ||
export VCS_INFO_GIT_FMT='on %F{magenta}%b%m%f at %F{magenta}%0.10i%c%u%f' | ||
|
||
export VCS_INFO_HG_ACTION_FMT='%F{magenta}%a%f on %F{magenta}%b%m%f at %F{magenta}%i%c%u %a%f' | ||
export VCS_INFO_HG_FMT='on %F{magenta}%b%m%f at %F{magenta}%i%c%u%f' | ||
|
||
export VCS_INFO_HG_REV_FMT='%r' | ||
export VCS_INFO_HG_BOOKMARK_FMT='' | ||
|
||
export VCS_INFO_STAGED_FMT='+' | ||
export VCS_INFO_UNSTAGED_FMT='!' | ||
export VCS_INFO_TIMESINCE_FMT=' $s' | ||
|
||
source ~/.zsh/plugins/vcs-info/style.zsh | ||
fi | ||
|
||
_prompt() { | ||
local s="%B%F{magenta}%n%f%b at %B%F{magenta}%m%f%b in %F{blue}%B${PWD/$HOME/~}%b%f" | ||
|
||
# display vcs info | ||
if [ "$vcs_info_msg_0_" ]; then | ||
s="$s $vcs_info_msg_0_" | ||
fi | ||
|
||
# display newline before prompt | ||
s="$s\n" | ||
|
||
# print virtualenv name if active | ||
if [ $VIRTUAL_ENV ]; then | ||
s="$s%K{black}${${(s:/:)VIRTUAL_ENV}[-1]}%k" | ||
fi | ||
|
||
echo -e "\n$s%F{magenta}>%f " | ||
} | ||
|
||
_rprompt() { | ||
# print return code if non-zero | ||
local rc=$? | ||
if [[ $rc != 0 ]]; then | ||
s="%F{red}$rc!%f" | ||
fi | ||
echo -e $s | ||
} | ||
|
||
PROMPT='$(_prompt)' | ||
RPROMPT='$(_rprompt)' |
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,89 @@ | ||
VIRTUAL_ENV_DISABLE_PROMPT=true | ||
|
||
if zeesh-plugin-enabled vcs-info; then | ||
export VCS_INFO_BRANCH_FMT='%b' | ||
|
||
export VCS_INFO_GIT_FMT='%F{magenta}‹%b%c%u%0.10i%m%s›%f' | ||
export VCS_INFO_GIT_ACTION_FMT='%F{magenta}‹%b%c%u%0.10i %a%m%s›%f' | ||
|
||
export VCS_INFO_HG_FMT='%F{magenta}‹%b%c%u%0.8i %m%s›%f' | ||
export VCS_INFO_HG_ACTION_FMT='%F{magenta}‹%b%c%u%0.10i %a %m%s›%f' | ||
|
||
export VCS_INFO_HG_BOOKMARK_FMT='' | ||
export VCS_INFO_HG_REV_FMT='%r ' | ||
|
||
export VCS_INFO_STAGED_FMT='+' | ||
export VCS_INFO_UNSTAGED_FMT='!' | ||
export VCS_INFO_TIMESINCE_FMT='$s' | ||
|
||
source ~/.zsh/plugins/vcs-info/style.zsh | ||
fi | ||
|
||
export ZEESH_THEME_NORMAL_CHAR='\n:' | ||
export ZEESH_THEME_VISUAL_CHAR='\n:' | ||
export ZEESH_THEME_INSERT_CHAR='\n;' | ||
export ZEESH_THEME_PROMPT_CHAR=' ' | ||
|
||
alias :=; | ||
alias ::=; | ||
alias :::=; | ||
alias ::::=; | ||
alias :::::=; | ||
alias ::::::=; | ||
alias :::::::=; | ||
alias ::::::::=; | ||
alias :::::::::=; | ||
alias ::::::::::=; | ||
|
||
_prompt() { | ||
local mode= | ||
case $KEYMAP in | ||
vicmd) | ||
mode=$ZEESH_THEME_NORMAL_CHAR | ||
;; | ||
vivis) | ||
mode=$ZEESH_THEME_VISUAL_CHAR | ||
;; | ||
*) | ||
mode=$ZEESH_THEME_INSERT_CHAR | ||
;; | ||
esac | ||
|
||
local s="%F{magenta}%B%n%b%f%F{magenta}@%f%F{magenta}%B%m%f%b %F{blue}%B${PWD/$HOME/~}%b%f" | ||
|
||
# display vcs info | ||
if [ "$vcs_info_msg_0_" ]; then | ||
s="$s $vcs_info_msg_0_" | ||
fi | ||
|
||
# print virtualenv name if active | ||
if [ $VIRTUAL_ENV ]; then | ||
s="$s %F{magenta}‹${${(s:/:)VIRTUAL_ENV}[-1]}›%f " | ||
fi | ||
|
||
echo -e "$s%F{magenta} $mode$ZEESH_THEME_PROMPT_CHAR%f" | ||
} | ||
|
||
_rprompt() { | ||
# print return code if non-zero | ||
local rc=$? | ||
|
||
if [[ $rc != 0 ]]; then | ||
local s="%F{red}% $(emoticon) $rc!%f" | ||
fi | ||
|
||
echo -e $s | ||
} | ||
|
||
PROMPT='$(_prompt)' | ||
RPROMPT='$(_rprompt)' | ||
|
||
zle-keymap-select() { | ||
zle reset-prompt | ||
} | ||
zle -N zle-keymap-select | ||
|
||
zle-line-init() { | ||
zle reset-prompt | ||
} | ||
zle -N zle-line-init |
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,83 @@ | ||
VIRTUAL_ENV_DISABLE_PROMPT=true | ||
|
||
if zeesh-plugin-enabled vcs-info; then | ||
export VCS_INFO_BRANCH_FMT='%b' | ||
|
||
export VCS_INFO_GIT_ACTION_FMT='%F{magenta}‹%b%c%u%0.10i %a%m%s›%f' | ||
export VCS_INFO_GIT_FMT='%F{magenta}‹%b%c%u%0.10i%m%s›%f' | ||
|
||
export VCS_INFO_HG_ACTION_FMT='%F{magenta}‹%b%c%u %i %a %m%s›%f' | ||
export VCS_INFO_HG_FMT='%F{magenta}‹%b%c%u %i %m%s›%f' | ||
|
||
export VCS_INFO_HG_BOOKMARK_FMT='' | ||
export VCS_INFO_HG_REV_FMT='%r' | ||
|
||
export VCS_INFO_STAGED_FMT='+' | ||
export VCS_INFO_UNSTAGED_FMT='!' | ||
export VCS_INFO_TIMESINCE_FMT='$s' | ||
|
||
source ~/.zsh/plugins/vcs-info/style.zsh | ||
fi | ||
|
||
export ZEESH_THEME_PROMPT_CHAR=${ZEESH_THEME_PROMPT_CHAR:-❯} | ||
export ZEESH_THEME_NORMAL_CHAR=${ZEESH_THEME_NORMAL_CHAR:-'\n⊙'} | ||
export ZEESH_THEME_VISUAL_CHAR=${ZEESH_THEME_VISUAL_CHAR:-'\n⊡'} | ||
export ZEESH_THEME_INSERT_CHAR=${ZEESH_THEME_INSERT_CHAR:-'\n$ZEESH_THEME_PROMPT_CHAR'} | ||
|
||
_prompt() { | ||
local mode= | ||
local s= | ||
|
||
case $KEYMAP in | ||
vicmd) | ||
mode=$ZEESH_THEME_NORMAL_CHAR | ||
;; | ||
vivis) | ||
mode=$ZEESH_THEME_VISUAL_CHAR | ||
;; | ||
*) | ||
mode=$ZEESH_THEME_INSERT_CHAR | ||
;; | ||
esac | ||
|
||
# only show user if in ssh connection | ||
[[ "$SSH_CONNECTION" != '' ]] && s="%F{magenta}%B%n%b%f%F{magenta}@%f%F{magenta}%B%m%f%b " | ||
|
||
s="$s%F{blue}%B${PWD/$HOME/~}%b%f" | ||
|
||
# display vcs info | ||
if [ "$vcs_info_msg_0_" ]; then | ||
s="$s $vcs_info_msg_0_" | ||
fi | ||
|
||
# print virtualenv name if active | ||
if [ $VIRTUAL_ENV ]; then | ||
s="$s %F{magenta}‹${${(s:/:)VIRTUAL_ENV}[-1]}›%f " | ||
fi | ||
|
||
echo -e "$s%F{magenta} $mode$ZEESH_THEME_PROMPT_CHAR%f " | ||
} | ||
|
||
_rprompt() { | ||
# print return code if non-zero | ||
local rc=$? | ||
|
||
if [[ $rc != 0 ]]; then | ||
local s="%F{red}% $(emoticon) $rc!%f" | ||
fi | ||
|
||
echo -e $s | ||
} | ||
|
||
PROMPT='$(_prompt)' | ||
RPROMPT='$(_rprompt)' | ||
|
||
zle-keymap-select() { | ||
zle reset-prompt | ||
} | ||
zle -N zle-keymap-select | ||
|
||
zle-line-init() { | ||
zle reset-prompt | ||
} | ||
zle -N zle-line-init |
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,53 @@ | ||
VIRTUAL_ENV_DISABLE_PROMPT=true | ||
|
||
if zeesh-plugin-enabled vcs-info; then | ||
export VCS_INFO_BRANCH_FMT='%b' | ||
|
||
export VCS_INFO_GIT_ACTION_FMT='%F{magenta}%b%m@%0.10i%c%u %a%f' | ||
export VCS_INFO_GIT_FMT='%F{magenta}%b%m@%0.10i%c%u%f' | ||
|
||
export VCS_INFO_HG_ACTION_FMT='%F{magenta}%b%m@%i%c%u %a%f' | ||
export VCS_INFO_HG_FMT='%F{magenta}%b%m@%i%c%u%f' | ||
|
||
export VCS_INFO_HG_BOOKMARK_FMT='' | ||
export VCS_INFO_HG_REV_FMT='%r' | ||
|
||
export VCS_INFO_STAGED_FMT='+' | ||
export VCS_INFO_UNSTAGED_FMT='!' | ||
export VCS_INFO_TIMESINCE_FMT='$s' | ||
|
||
source ~/.zsh/plugins/vcs-info/style.zsh | ||
fi | ||
|
||
_prompt() { | ||
echo -e "%F{magenta}%B%n%b%f%F{magenta}@%f%F{magenta}%B%m%f%b%F{magenta}›%f " | ||
} | ||
|
||
_rprompt() { | ||
local rc=$? | ||
local s="" | ||
|
||
# print return code if non-zero | ||
if [[ $rc != 0 ]]; then | ||
rc="$rc"! | ||
s="%F{red}% $rc$(emoticon) %f" | ||
fi | ||
|
||
# print virtualenv name if active | ||
if [ $VIRTUAL_ENV ]; then | ||
s="$s%F{magenta}${${(s:/:)VIRTUAL_ENV}[-1]}%f:" | ||
fi | ||
|
||
# print path | ||
s="$s%F{blue}%B${PWD/$HOME/~}%b%f" | ||
|
||
# display vcs info | ||
if [ "$vcs_info_msg_0_" ]; then | ||
s="$s $vcs_info_msg_0_" | ||
fi | ||
|
||
echo -e $s | ||
} | ||
|
||
PROMPT='$(_prompt)' | ||
RPROMPT='$(_rprompt)' |
Oops, something went wrong.