summaryrefslogtreecommitdiff
path: root/Functions/Misc/zrecompile
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2000-04-20 12:45:21 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2000-04-20 12:45:21 +0000
commit1f00aac0be24a5fb5438e63a2f4f3bf21ba47dfc (patch)
tree3030802e7f1f2ebba98dec680b4bf5a7eab8d096 /Functions/Misc/zrecompile
parentb572f0295ca66596124d413f0f1266a5415d2295 (diff)
downloadzsh-1f00aac0be24a5fb5438e63a2f4f3bf21ba47dfc.tar.gz
zsh-1f00aac0be24a5fb5438e63a2f4f3bf21ba47dfc.zip
don't remove *all* .zwc files, keep the first one (10881)
Diffstat (limited to 'Functions/Misc/zrecompile')
-rw-r--r--Functions/Misc/zrecompile4
1 files changed, 3 insertions, 1 deletions
diff --git a/Functions/Misc/zrecompile b/Functions/Misc/zrecompile
index 1cdd05e0e..88d976f5b 100644
--- a/Functions/Misc/zrecompile
+++ b/Functions/Misc/zrecompile
@@ -66,13 +66,15 @@ if [[ -n $pats ]]; then
argv=()
fi
- files=( ${files:#*(.zwc|~)} )
if [[ $files[1] = -[RM] ]]; then
map=( $files[1] )
shift 1 files
else
map=()
fi
+ (( $#files )) || continue
+
+ files=( $files[1] ${files[2,-1]:#*(.zwc|~)} )
(( $#files )) || continue