X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=zk.zsh;h=b6ac72d05e46e06d663e437ca9a5a41ddf2459e5;hb=95c1084debae483c5674606175d7e9903675643e;hp=d583ae3d5d3dc5a990578bad5599916e9605a347;hpb=5264b1f98b851978e5794c51ed38e18b177fd143;p=zk.zsh.git diff --git a/zk.zsh b/zk.zsh index d583ae3..b6ac72d 100755 --- a/zk.zsh +++ b/zk.zsh @@ -156,25 +156,30 @@ genIndex() { typeset -aU cats=() local curdepth=${#${(s:/:)1}} (( curdepth = curdepth + 1 )) - for p (${(oi)${(k)pages[(I)$1*]}}) { - [[ ( $p =~ "/index$" ) || ( $p = "index" ) ]] && continue + for p (${(k)pages[(I)$1*]}) { case ${#${(As:/:)p}} in ($curdepth) _links=($p $_links) ;; ( $(( $curdepth + 1 )) ) cats=(${1}${${p#$1}%%/*} $cats) ;; (*) continue ;; esac } - for p (${(oi)_links}) \ - entries=($entries "[$p] (${pages[$p]}) (${sizes[$p]} bytes)") + local page=${1}index + print " +