autoload colors zsh/terminfo
if [[ "$terminfo[colors]" -ge 8 ]]; then
- colors
+ colors
fi
eval `dircolors`
setopt \
- EXTENDEDGLOB \
- BASH_AUTO_LIST \
- LIST_AMBIGUOUS \
- CHECK_JOBS \
- INC_APPEND_HISTORY \
- HIST_IGNORE_DUPS \
- HIST_IGNORE_SPACE \
- NO_HUP
+ EXTENDEDGLOB \
+ BASH_AUTO_LIST \
+ LIST_AMBIGUOUS \
+ CHECK_JOBS \
+ INC_APPEND_HISTORY \
+ HIST_IGNORE_DUPS \
+ HIST_IGNORE_SPACE \
+ NO_HUP
HISTFILE=~/.zsh_history
function setprompt()
{
- # default: " (%s)-[%b|%a]%u%c-"
- zstyle ':vcs_info:*' actionformats " %s: %b|%a"
- # default: " (%s)-[%b]%u%c-"
- zstyle ':vcs_info:*' formats " %s: %b"
+ # default: " (%s)-[%b|%a]%u%c-"
+ zstyle ':vcs_info:*' actionformats " %s: %b|%a"
+ # default: " (%s)-[%b]%u%c-"
+ zstyle ':vcs_info:*' formats " %s: %b"
- setopt PROMPT_SUBST
- PROMPT='
+ setopt PROMPT_SUBST
+ PROMPT='
%(!.%{$fg_bold[red]%}.%{$fg_bold[green]%})%n@%m%{$reset_color%}$PR_SCREEN$PR_JOBS%{$fg_bold[yellow]%}${vcs_info_msg_0_}%{$reset_color%} %{$fg_bold[blue]%}%~%{$reset_color%}
$PR_EXIT%# '
}
function precmd ()
{
- PR_EXIT="%{$fg_bold[red]%}%(?..[%?] )%{$reset_color%}"
+ PR_EXIT="%{$fg_bold[red]%}%(?..[%?] )%{$reset_color%}"
# Check whether current directory is a subdirectory of an autofs mountpoint
local parent="0"
parent="1"
# Even equal!
if echo "$mp" | /bin/grep -q $PWD; then
- vcs_info_msg_0_=" [autofs]"
+ vcs_info_msg_0_=" [autofs]"
fi
break;
fi
done
+
if [ -z "$vcs_info_msg_0_" ]; then
if [ "$parent" = "1" ]; then
# svn and hg cause complaints of autofs that .svn and .hg is no mount point
else
zstyle ':vcs_info:*' enable git cvs svn hg
fi
- vcs_info
+ vcs_info
fi
- PR_SCREEN=""
- if [[ -n "${WINDOW}" ]]; then
- PR_SCREEN=" S:${WINDOW}"
- fi
+ PR_SCREEN=""
+ if [[ -n "${WINDOW}" ]]; then
+ PR_SCREEN=" S:${WINDOW}"
+ fi
- PR_JOBS=""
- if [[ $(jobs | wc -l) -gt 0 ]]; then
- PR_JOBS=" J:%j"
- fi
+ PR_JOBS=""
+ if [[ $(jobs | wc -l) -gt 0 ]]; then
+ PR_JOBS=" J:%j"
+ fi
}
-
-
-