]> Sergey Matveev's repositories - zk.zsh.git/blobdiff - zk.zsh
More strict regexp
[zk.zsh.git] / zk.zsh
diff --git a/zk.zsh b/zk.zsh
index baa129696922dbbf53c2aea7f37aeff2e5aefbae..25a3036ec1fbfb53ba4964a81726b8d8ccc15cd9 100755 (executable)
--- a/zk.zsh
+++ b/zk.zsh
@@ -36,7 +36,7 @@ typeset -aU words
 for p (${(k)pages}) {
     words=()
     for w (${=mapfile[$p]}) {
-        [[ $w =~ "\[(.*)\]" ]] || continue
+        [[ $w =~ "\[([^] ]+)\]" ]] || continue
         w=${match[1]}
         [[ ${pages[$w]} ]] || {
             [[ $ZK_SHOW_MISSING ]] && print "missing $w"