summaryrefslogtreecommitdiff
path: root/etc/functions/finfo
blob: 87b8acd9d20ff3f637222f6e19dd318b1a3665bc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
## vim:ft=zsh
## finfo - show function info
## Assume that a function begins with an introduction, and print it
typeset line

[[ -n $(whichf $1) ]] || return 1

while read line; do
	[[ $line == \#* ]] || break
	[[ $line == *vim:ft=* ]] && continue
	echo ${line#(\#|)\# }
done < $(whichf $1)