From d6a96f3a1ba0a27a8bf32bb6952649b6b983df68 Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Tue, 15 Mar 2022 20:55:23 +0300 Subject: [PATCH] Do not list Index itself --- zk.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) ;; -- 2.44.0