summaryrefslogtreecommitdiff
path: root/etc/functions
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2008-10-25 18:17:11 +0200
committerDaniel Friesel <derf@derf.homelinux.org>2008-10-25 18:17:11 +0200
commit26142aca7401862cd541ced534ca91bb7d7304ce (patch)
treed325b155ca6e7fa1c2a42cd94c2a8fb273723631 /etc/functions
parent0fa756c25e2e45c04db7e0c2c22a7c8d08cec0c1 (diff)
Added need-comp
Diffstat (limited to 'etc/functions')
-rw-r--r--etc/functions/need-comp9
1 files changed, 9 insertions, 0 deletions
diff --git a/etc/functions/need-comp b/etc/functions/need-comp
new file mode 100644
index 0000000..a38b561
--- /dev/null
+++ b/etc/functions/need-comp
@@ -0,0 +1,9 @@
+## vim:ft=zsh
+
+check_comp() {
+ ((! $+_comps[$1])) && print $1
+}
+
+{
+ for f ($^path/*(N:t)) check_comp $f
+} | sort