]> Sergey Matveev's repositories - torn.git/blobdiff - torn.zsh
Raise copyright years
[torn.git] / torn.zsh
index 7c2876c611b5631242cfaa274351aa6eaa0597f5..d9900de9acb1aac5af1764ca02df1f87ab837fdd 100755 (executable)
--- a/torn.zsh
+++ b/torn.zsh
@@ -1,13 +1,13 @@
 # torn - Musical files renaming with russian language transliteration
-# Copyright (C) 2021-2023 Sergey Matveev (stargrave@stargrave.org)
+# Copyright (C) 2021-2024 Sergey Matveev (stargrave@stargrave.org)
 #
 # This program is free software; you can redistribute it and/or modify
 # 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
@@ -52,6 +52,8 @@ tornm() {
     local n=$1
     n=${n:gs/ /_}
     n=${n//_[–-]_/-}
+    n=${n//_[–-]/-}
+    n=${n//[–-]_/-}
     n=${n:gs/,_/,}
     n=${n//[\[\]]/}
     n=${n:gs/_(/(}