From: Sergey Matveev Date: Sun, 4 May 2025 12:04:42 +0000 (+0300) Subject: Show number of entries in category X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=313d2a863512f516c49e0c4436356b629f609c23;p=zk.git Show number of entries in category --- diff --git a/zk.zsh b/zk.zsh index afe5680..e331c55 100755 --- a/zk.zsh +++ b/zk.zsh @@ -35,7 +35,10 @@ for p (**(.)) { sizes[$p]=${size[1]} } typeset -A cats -for p (**(/)) cats[$p]=1 +for p (**(/)) { + local files=($p/*(N)) + cats[$p]=$#files +} zmodload zsh/mapfile zmodload -F zsh/files b:zf_mkdir @@ -183,12 +186,12 @@ genIndex() { } print "" if [[ $_cats ]]; then - print "
Subdirectories: