summaryrefslogtreecommitdiff
path: root/etc/functions/finfo
diff options
context:
space:
mode:
Diffstat (limited to 'etc/functions/finfo')
-rwxr-xr-xetc/functions/finfo12
1 files changed, 12 insertions, 0 deletions
diff --git a/etc/functions/finfo b/etc/functions/finfo
new file mode 100755
index 0000000..694ab6c
--- /dev/null
+++ b/etc/functions/finfo
@@ -0,0 +1,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)