summary refs log tree commit diff
path: root/Functions
diff options
context:
space:
mode:
Diffstat (limited to 'Functions')
-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