summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--Functions/Misc/zrecompile23
2 files changed, 19 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index 9af27815a..b2cb341ac 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2002-03-07 Sven Wischnowsky <wischnow@zsh.org>
+
+ * 16774: Functions/Misc/zrecompile: make zrecompile show the
+ error messages from zcompile unless the -q option is given
+
2002-03-06 Adam Spiers <adam@spiers.net>
* 16769: Completion/Unix/Command/_gcc: fix typo
diff --git a/Functions/Misc/zrecompile b/Functions/Misc/zrecompile
index 325415157..0db27f497 100644
--- a/Functions/Misc/zrecompile
+++ b/Functions/Misc/zrecompile
@@ -128,11 +128,13 @@ if [[ -n $pats ]]; then
# If the file is mapped, it might be mapped right now, so keep the
# old file by renaming it.
- if { [[ ! -f $zwc ]] || mv $zwc ${zwc}.old } &&
- zcompile $map $tmp $zwc $files 2> /dev/null; then
- [[ -z $quiet ]] && print succeeded
- else
- [[ -z $quiet ]] && print failed
+ if [[ -z "$quiet" ]] &&
+ { [[ ! -f $zwc ]] || mv $zwc ${zwc}.old } &&
+ zcompile $map $tmp $zwc $files; then
+ print succeeded
+ elif ! { { [[ ! -f $zwc ]] || mv $zwc ${zwc}.old } &&
+ zcompile $map $tmp $zwc $files 2> /dev/null } then
+ [[ -z $quiet ]] && print "re-compiling ${zwc}: failed"
ret=1
fi
fi
@@ -230,10 +232,13 @@ for zwc; do
# If the file is mapped, it might be mapped right now, so keep the
# old file by renaming it.
- if mv $zwc ${zwc}.old && zcompile $map $zwc $files 2> /dev/null; then
- [[ -z $quiet ]] && print $mesg
- else
- [[ -z $quiet ]] && print failed
+ if [[ -z "$quiet" ]] &&
+ mv $zwc ${zwc}.old &&
+ zcompile $map $zwc $files; then
+ print $mesg
+ elif ! { mv $zwc ${zwc}.old &&
+ zcompile $map $zwc $files 2> /dev/null } then
+ [[ -z $quiet ]] && print "re-compiling ${zwc}: failed"
ret=1
fi
fi