name : only target matching files by default.

This commit is contained in:
Dmitry Voronin 2023-11-26 01:05:17 +03:00
parent c3301caa23
commit 3fa9f62f09

View file

@ -345,7 +345,7 @@ name_prefix()
# All targets by default.
if [[ "${targets}" = "" ]]; then
targets=([^.]*)
targets=(${old}*)
total=${#targets[@]}
fi
@ -393,7 +393,7 @@ name_postfix()
# All targets by default.
if [[ "${targets}" = "" ]]; then
targets=([^.]*)
targets=(*${old})
total=${#targets[@]}
fi
@ -403,7 +403,7 @@ name_postfix()
((count++))
# Create new name.
local new_name="${new}${target%$old}"
local new_name="${target%$old}${new}"
# Prepare status.
local status="[${count}/${total}] ${target} -> ${new_name}"