# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, version 3 of the License.
-# Initially this script was written on Perl, but now it is zsh function,
-# that is intended to be used with zmv command. It is much more flexible
-# to be used with zsh'es glob expansion.
+# Initially this script was written on Perl, but now it is Z shell
+# function, that is intended to be used with zmv command. It is much
+# more flexible to be used with zsh'es glob expansion.
#
# * transliterates everything
# * replaces non FAT-compatible characters with underscores
local n=$1
n=${n:gs/ /_}
n=${n//_[–-]_/-}
+ n=${n//_[–-]/-}
+ n=${n//[–-]_/-}
n=${n:gs/,_/,}
n=${n//[\[\]]/}
n=${n:gs/_(/(}
print -- $n
}
-[[ -n $1 ]] || exit
+[[ -n $1 ]] || return
local n=${1:t}
n=`tornm $n`
n=`tornt $n`