summaryrefslogtreecommitdiff
path: root/Functions
diff options
context:
space:
mode:
Diffstat (limited to 'Functions')
-rw-r--r--Functions/Prompts/prompt_redhat_setup2
-rw-r--r--Functions/Prompts/promptinit6
-rw-r--r--Functions/VCS_Info/Backends/VCS_INFO_get_data_svn18
-rw-r--r--Functions/VCS_Info/VCS_INFO_check_com2
-rw-r--r--Functions/Zle/url-quote-magic1
5 files changed, 24 insertions, 5 deletions
diff --git a/Functions/Prompts/prompt_redhat_setup b/Functions/Prompts/prompt_redhat_setup
index 5bde7f9ab..5adf2d7cf 100644
--- a/Functions/Prompts/prompt_redhat_setup
+++ b/Functions/Prompts/prompt_redhat_setup
@@ -3,7 +3,7 @@
# Styled like the default prompt in Red Hat 5.1
#
prompt_redhat_setup () {
- PS1="[%n@%m %1~]\\$ "
+ PS1='[%n@%m %1~]%(#.#.$) '
PS2="> "
prompt_opts=( cr percent )
diff --git a/Functions/Prompts/promptinit b/Functions/Prompts/promptinit
index b07eabb1f..66e73a7a5 100644
--- a/Functions/Prompts/promptinit
+++ b/Functions/Prompts/promptinit
@@ -155,8 +155,10 @@ Use prompt -h <theme> for help on specific themes.'
fi
# Reset some commonly altered bits to the default
- add-zsh-hook -D precmd "prompt_*_precmd"
- add-zsh-hook -D preexec "prompt_*_preexec"
+ local hook
+ for hook in chpwd precmd preexec periodic zshaddhistory zshexit; do
+ add-zsh-hook -D "${hook}" "prompt_*_${hook}"
+ done
set -A zle_highlight ${zle_highlight:#default:*}
(( ${#zle_highlight} )) || unset zle_highlight
diff --git a/Functions/VCS_Info/Backends/VCS_INFO_get_data_svn b/Functions/VCS_Info/Backends/VCS_INFO_get_data_svn
index b1cb7302b..41cc3e783 100644
--- a/Functions/VCS_Info/Backends/VCS_INFO_get_data_svn
+++ b/Functions/VCS_Info/Backends/VCS_INFO_get_data_svn
@@ -6,12 +6,28 @@
setopt localoptions noksharrays extendedglob NO_shwordsplit
local svnbase svnbranch a b rrn
+local -i rc
local -A svninfo parentinfo
local -xA hook_com
svnbase=".";
svninfo=()
-${vcs_comm[cmd]} info --non-interactive | while IFS=: read a b; do svninfo[${a// /_}]="${b## #}"; done
+# Unfortunately, `$pipestatus' is broken currently. Until that problem is
+# resolved, here is a workaround that will get things done, without using it.
+# Clumsily, but that's life.
+local -a dat
+dat=( ${(f)"$(${vcs_comm[cmd]} info --non-interactive 2>&1)"} )
+rc=$?
+(( rc != 0 )) && return 1
+# The following line is the real code, the following is the workaround.
+#${vcs_comm[cmd]} info --non-interactive \
+print -l "${dat[@]}" \
+|& while IFS=: read a b; do
+ svninfo[${a// /_}]="${b## #}"
+done
+#rc=${pipestatus[1]}
+#(( rc != 0 )) && return 1
+
while [[ -d "${svnbase}/../.svn" ]]; do
parentinfo=()
${vcs_comm[cmd]} info --non-interactive "${svnbase}/.." | while IFS=: read a b; do parentinfo[${a// /_}]="${b## #}"; done
diff --git a/Functions/VCS_Info/VCS_INFO_check_com b/Functions/VCS_Info/VCS_INFO_check_com
index d9f7a1330..1b86593a1 100644
--- a/Functions/VCS_Info/VCS_INFO_check_com
+++ b/Functions/VCS_Info/VCS_INFO_check_com
@@ -9,7 +9,7 @@ case $1 in
[[ -x $1 ]] && return 0
;;
(*)
- (( ${+commands[$1]} )) && [[ -x ${commands[$1]} ]] && return 0
+ (( ${+commands[$1]} )) && return 0
esac
return 1
diff --git a/Functions/Zle/url-quote-magic b/Functions/Zle/url-quote-magic
index ee8b6f62f..c7bb88c5d 100644
--- a/Functions/Zle/url-quote-magic
+++ b/Functions/Zle/url-quote-magic
@@ -60,6 +60,7 @@
# Use compsys for nested quoting analysis and command parsing.
# Establish default values for styles, but only if not already set
+local -a reply
zstyle -m ':url-quote-magic:\*' url-metas '*' ||
zstyle ':url-quote-magic:*' url-metas '*?[]^(|)~#{}='