+ emulate -L zsh
+ setopt extendedglob
+ local it apre apost new v
+ local -a items
+
+ zstyle -a ':prompt:grml:setup' items items \
+ || items=( rc change-root user at host path vcs percent )
+ PS1=''
+ for it in "${items[@]}"; do
+ zstyle -s ":prompt:grml:items:$it" pre apre \
+ || apre=${grml_prompt_pre_default[$it]}
+ zstyle -s ":prompt:grml:items:$it" post apost \
+ || apost=${grml_prompt_post_default[$it]}
+ zstyle -s ":prompt:grml:items:$it" token new \
+ || new=${grml_prompt_token_default[$it]}
+ PS1="${PS1}${apre}"
+ case $it in
+ change-root)
+ (( ${+parameters[$new]} )) && PS1="${PS1}(${(P)new})"
+ ;;
+ vcs)
+ v="vcs_info_msg_${new}_"
+ vcs_info
+ if (( ${+parameters[$v]} )) && [[ -n "${(P)v}" ]]; then
+ PS1="${PS1}${(P)v}"
+ fi
+ ;;
+ *) PS1="${PS1}${new}" ;;
+ esac
+ PS1="${PS1}${apost}"
+ done
+ if zstyle -t ':prompt:grml:setup' use-rprompt; then
+ zstyle -s ":prompt:grml:items:sad-smiley" token new \
+ || new=${grml_prompt_token_default[sad-smiley]}
+ RPS1="$new"
+ fi