From: Sergey Matveev Date: Tue, 15 Mar 2022 17:55:23 +0000 (+0300) Subject: Do not list Index itself X-Git-Url: http://www.git.stargrave.org/?p=zk.zsh.git;a=commitdiff_plain;h=d6a96f3a1ba0a27a8bf32bb6952649b6b983df68 Do not list Index itself --- diff --git a/zk.zsh b/zk.zsh index a4984cc..2a5d00a 100755 --- 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) ;;