Prefix one more function listed together with aliases with 'function'
[abe:zshrc.git] / zsh.d / 10-prompt
1 # -*- sh -*-
2 if (( EUID != 0 )); then
3     USERBEGIN="%B"
4     USEREND="%b"
5     BLOCKBEGIN="%S"
6     BLOCKEND="%s"
7 else
8     USERBEGIN="%{\e[31m%}"
9     USEREND="%{\e[m%}"
10     BLOCKBEGIN="%B"
11     BLOCKEND="%b"
12 fi
13
14 WHICH_LSB_RELEASE="$(which lsb_release | head -1)"
15 PROMPT_DISTRIBUTION_PREFIX=""
16 if [ -n "$WHICH_LSB_RELEASE" -a -x "$WHICH_LSB_RELEASE" ]; then
17     DISTRIBUTION="$(${WHICH_LSB_RELEASE} -si)"
18     if [ "$DISTRIBUTION" = "Ubuntu" ]; then
19         PROMPT_DISTRIBUTION_PREFIX="%{\e[33m%}U%{\e[m%} ";
20     fi
21 fi
22
23 # $ZSH_VERSION
24 PROMPT="${PROMPT_DISTRIBUTION_PREFIX}%S!%h Z%i %(?..%{\e[31m%})?%?%(?..%{\e[m%}%S) L%L%s ${debian_chroot:+($debian_chroot)}${USERBEGIN}%n@%m${USEREND}%B:%y%b (%U%N%u) %B%* [%5~] %b%<<"'${VCS_INFO_message_0_}${vcs_info_msg_0_}'"%B%(!.#.>)%b "
25
26 #PROMPT="${RED}${EXITCODE}${WHITE}${debian_chroot:+($debian_chroot)}${BLUE}%n${NO_COLOUR}@%m %40<...<%B%~%b%<< "'${VCS_INFO_message_0_}'"%# "