From owner-freebsd-hackers Fri Mar 24 17: 4:36 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from ns1.sunesi.net (ns1.sunesi.net [196.15.192.194]) by hub.freebsd.org (Postfix) with ESMTP id 74DBA37BD93; Fri, 24 Mar 2000 17:04:26 -0800 (PST) (envelope-from nbm@sunesi.net) Received: from nbm by ns1.sunesi.net with local (Exim 3.03 #1) id 12YezO-000KuY-00; Sat, 25 Mar 2000 03:03:42 +0200 Date: Sat, 25 Mar 2000 03:03:42 +0200 From: Neil Blakey-Milner To: Doug Barton Cc: Akinori -Aki- MUSHA , freebsd-hackers@freebsd.org, shige@freebsd.org Subject: Re: zsh compdef collection for FreeBSD Message-ID: <20000325030342.A80255@mithrandr.moria.org> References: <86ln38vutx.wl@archon.local.idaemons.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre2i In-Reply-To: Organization: Sunesi Clinical Systems X-Operating-System: FreeBSD 3.3-RELEASE i386 X-URL: http://rucus.ru.ac.za/~nbm/ Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Fri 2000-03-24 (16:52), Doug Barton wrote: > I use the following in my .bashrc. I'm operating on the assumption > that zsh has aliases of some sort, otherwise feel free to ignore this > entire post. :) My ~/.tcsh/os-FreeBSD (which get auto-called by my .tcshrc) has: /---- setenv PR_FORM ~/.send-pr # bsd make allows knowing the targets like so: uncomplete make complete make 'p@*@`if -e Makefile make -dg1 -q | grep "^[^.#][-_a-z. \t]*:" | awk '"'"'{print $1}'"'"'`@' # if I have a local copy of the cvs tree, add aliases to easy moving # into it alias ncvs 'if ( "\!*" == "" ) then \ pushd $NCVS/`pwd | cut -f 3- -d/`; \ else \ pushd $NCVS/\!*; \ endif' complete ncvs "p%*%D:$NCVS/%" alias uncvs 'popd' complete pkg_delete 'p%*%D:/var/db/pkg/% %' complete pkg_info 'p%*%D:/var/db/pkg/% %' # indt alias compares given code to code given by indent(1) alias indt 'cat \!\!:1 | indent -st | diff \!\!:1 - | $PAGER' # show the rlog of a file through favourite pager alias rl 'rlog \!:1 | $PAGER' /--- That basically sets up 'make' completion: (nbm@mithrandr) /usr/src> make afterdistribute everything move-aout-libs all hierarchy obj aout-to-elf includes objlink aout-to-elf-build install regress aout-to-elf-install installkernel rerelease ... It also completes pkg_delete and pkg_info: (nbm@mithrandr) /usr/home/nbm> pkg_delete c cdd-1.0/ checkpassword-0.81/ cvsup-mirror-1.0/ cdrecord-1.8a33/ cvsup-bin-16.1/ cvsupd-bin-16.1/ ncvs pops me into the cvs tree of the directory I'm in: (nbm@mithrandr) /usr/src/contrib/cvs> ncvs (nbm@mithrandr) /home/ncvs/src/contrib/cvs> uncvs pushes me back. ncvs could be made much more intelligent, of course. Anyway, enough of that. Time for me to finally learn zsh. Neil -- Neil Blakey-Milner nbm@rucus.ru.ac.za To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message