]> Sergey Matveev's repositories - zk.zsh.git/commitdiff
Do not list Index itself
authorSergey Matveev <stargrave@stargrave.org>
Tue, 15 Mar 2022 17:55:23 +0000 (20:55 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Tue, 15 Mar 2022 18:14:38 +0000 (21:14 +0300)
zk.zsh

diff --git a/zk.zsh b/zk.zsh
index a4984cc0fa3731550e40388b537bc812fb762dc4..2a5d00ababb74f36f9d4ecbff4052c5ece39ef27 100755 (executable)
--- a/zk.zsh
+++ b/zk.zsh
@@ -152,7 +152,7 @@ genIndex() {
     local curdepth=${#${(s:/:)1}}
     (( curdepth = curdepth + 1 ))
     for p (${(oi)${(k)pages[(I)$1*]}}) {
-        [[ $p =~ "/Index$" ]] && continue
+        [[ ( $p =~ "/Index$" ) || ( $p = "Index" ) ]] && continue
         case ${#${(As:/:)p}} in
         ($curdepth) _links=($p $_links) ;;
         ( $(( $curdepth + 1 )) ) cats=(${1}${${p#$1}%%/*} $cats) ;;