Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
man compctl
- X-seq: zsh-users 1271
- From: Thomas Köhler <jean-luc@xxxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxxxxxxx
- Subject: man compctl
- Date: Fri, 23 Jan 1998 22:22:36 +0100
- References: <E0xucM7-00074S-00@xxxxxxxxxxxxxxxxxx> <82hg6zowz8.fsf@xxxxxxxxxxx>
Hello all,
here's my completion for manpages.
# completion for manpages
####
# if ~/tmp/_man_ is too old then remove it and create a new one later
find ~/tmp -mtime 14 -name "_man_" -exec rm -f {} \;
createman () {
echo "creating ~/tmp/_man_"
find /usr/man -type f > ~/tmp/_man_
find /usr/local/man -type f >> ~/tmp/_man_
find /usr/X11R6/man -type f >> ~/tmp/_man_
sed -e "s/.*\///" -e "s/\.gz//" -e "s/\.[^.]*$//" ~/tmp/_man_ | sort | uniq > ~/tmp/_man2_
rm -f ~/tmp/_man_
(for i in `cat ~/tmp/_man2_` ; do echo -n "$i " ; done) > ~/tmp/_man_
rm -f ~/tmp/_man2_
}
if [ ! -f ~/tmp/_man_ ] ; then createman ; fi
####
man_pages=(`cat ~/tmp/_man_`)
compctl -f -k man_pages man
Remarks:
the first part (#### - ####) should better be put in a cron job or in
your .zlogout (if you don't have access to crontab) - it may take some
time to process those finds :-)
CU,
Thomas
--
-- Thomas Köhler Email: jean-luc@xxxxxxxxxxxxxxxxx
<>< jean-luc@xxxxxxx
IRC: jeanluc Channels: #star_trek #linuxger #ixthys #knf
WWW: http://home.pages.de/~jeanluc/
Messages sorted by:
Reverse Date,
Date,
Thread,
Author