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
[EMAIL PROTECTED]


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to