]> Sergey Matveev's repositories - torn.git/commitdiff
Another convenient replacement
authorSergey Matveev <stargrave@stargrave.org>
Wed, 22 Mar 2023 08:42:29 +0000 (11:42 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Wed, 22 Mar 2023 08:42:29 +0000 (11:42 +0300)
torn.zsh

index 7c2876c611b5631242cfaa274351aa6eaa0597f5..4d8bcd707a05e283812ddbe3b5127438e3d78000 100755 (executable)
--- a/torn.zsh
+++ b/torn.zsh
@@ -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/_(/(}