diff --git a/Functions/Misc/zmv b/Functions/Misc/zmv index 269fe5ba5..51c8ad3ab 100644 --- a/Functions/Misc/zmv +++ b/Functions/Misc/zmv @@ -236,12 +236,14 @@ if [[ $pat = (#b)(*)\((\*\*##/)\)(*) ]]; then else fpat=$pat fi -files=(${~fpat}) +files=(${~fpat}(#qN)) [[ -n $hasglobqual ]] && pat=$opat errs=() +[[ -n $files ]] || errs=( "no files matched \`$fpat'" ) + for f in $files; do if [[ $pat = (#b)(*)\(\*\*##/\)(*) ]]; then # This looks like a recursive glob. This isn't good enough,