]> Sergey Matveev's repositories - torn.git/commitdiff
Damned Unicode dash
authorSergey Matveev <stargrave@stargrave.org>
Tue, 21 Dec 2021 11:22:26 +0000 (14:22 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Tue, 21 Dec 2021 11:22:26 +0000 (14:22 +0300)
torn.zsh

index 3ea8becb14093734fe7b36466a376654b519ac6b..511d544960a1159cb94c5f51c46976f1c481aee9 100755 (executable)
--- a/torn.zsh
+++ b/torn.zsh
@@ -48,7 +48,7 @@ tornt() {
 tornm() {
     local n=$1
     n=${n:gs/ /_}
-    n=${n:gs/_-_/-}
+    n=${n//_[–-]_/-}
     n=${n:gs/,_/,}
     n=${n//[\[\]]/}
     n=${n:gs/_(/(}