# -*- mode: shell-script; -*- # Makes all files in lower case. Works with Non-ASCII characters. # Equivalent to `zmv "${dir}/(*)" '${dir}/${1:l}'` function mksmol() { if [[ ${ARGC} -ne 1 ]]; then print -u 2 "Usage: ${0} " >&2 return 1 fi local dir="${1}" for file in "${dir}"/*; do basename="${file##*/}" newfile="${dir}/${basename:l}" [[ "${file}" != "${newfile}" ]] && mv "${file}" "${newfile}" || : done }