From 6895abeab878a30d05c122c2467990ebb47bd58a Mon Sep 17 00:00:00 2001 From: Dmitry Chagin Date: Sat, 18 Mar 2017 21:41:53 +0000 Subject: [PATCH] Import of tcsh-6.20.00 --- Copyright | 6 +- Fixes | 92 + Imakefile | 6 +- Makefile.in | 50 +- Makefile.man2html | 17 + Makefile.std | 18 +- Makefile.vms | 4 +- README | 2 +- aclocal.m4 | 1409 +++++ complete.tcsh | 2315 ++++---- config.guess | 590 +- config.h.in | 5 +- config.sub | 280 +- config/android | 5 +- config/bsd4.4 | 1 + config_f.h | 10 +- configure | 418 +- configure.in => configure.ac | 28 +- cygwin/postinstall.sh | 12 - cygwin/preremove.sh | 2 - dotlock.c | 180 + dotlock.h | 35 + ed.chared.c | 45 +- ed.decls.h | 4 +- ed.defns.c | 45 +- ed.inputl.c | 24 +- ed.refresh.c | 60 +- ed.screen.c | 36 +- ed.term.h | 14 +- ed.xmap.c | 6 +- gethost.c | 42 +- glob.c | 6 + host.defs | 123 +- nls/C/set1 | 14 +- nls/C/set20 | 4 +- nls/C/set9 | 4 +- nls/Makefile.in | 30 +- nls/catgen | 10 +- nls/et/set1 | 14 +- nls/et/set20 | 4 +- nls/et/set9 | 4 +- nls/finnish/set1 | 14 +- nls/finnish/set20 | 4 +- nls/finnish/set3 | 16 +- nls/finnish/set9 | 10 +- nls/french/set1 | 14 +- nls/french/set20 | 4 +- nls/french/set9 | 4 +- nls/german/set1 | 14 +- nls/german/set20 | 4 +- nls/german/set9 | 4 +- nls/greek/set1 | 14 +- nls/greek/set20 | 4 +- nls/greek/set9 | 4 +- nls/italian/set1 | 14 +- nls/italian/set20 | 4 +- nls/italian/set9 | 4 +- nls/ja/set1 | 14 +- nls/pl/set1 | 12 +- nls/pl/set20 | 2 +- nls/pl/set9 | 2 +- nls/russian/set1 | 14 +- nls/russian/set20 | 4 +- nls/russian/set9 | 4 +- nls/spanish/set1 | 14 +- nls/spanish/set20 | 4 +- nls/spanish/set9 | 4 +- nls/ukrainian/set1 | 14 +- nls/ukrainian/set20 | 4 +- nls/ukrainian/set9 | 4 +- patchlevel.h | 8 +- sh.c | 55 +- sh.char.h | 10 +- sh.decls.h | 8 +- sh.dir.c | 9 +- sh.dol.c | 26 +- sh.err.c | 24 +- sh.exec.c | 18 +- sh.exp.c | 14 +- sh.file.c | 10 +- sh.func.c | 84 +- sh.glob.c | 84 +- sh.h | 68 +- sh.hist.c | 136 +- sh.init.c | 6 +- sh.lex.c | 17 +- sh.misc.c | 62 +- sh.print.c | 14 +- sh.proc.c | 57 +- sh.proc.h | 19 +- sh.sem.c | 45 +- sh.set.c | 61 +- sh.time.c | 15 +- tc.alloc.c | 48 +- tc.bind.c | 14 +- tc.const.c | 19 +- tc.decls.h | 10 +- tc.func.c | 117 +- tc.nls.c | 50 +- tc.nls.h | 5 +- tc.os.c | 26 +- tc.printf.c | 118 +- tc.prompt.c | 19 +- tc.str.c | 40 +- tc.who.c | 6 +- tcsh.man | 308 +- tcsh.man.new | 9866 ++++++++++++++++++++++++++++++++++ tests/commands.at | 50 +- tests/lexical.at | 86 +- tests/parenthesis.at | 63 + tests/syntax.at | 31 +- tests/testsuite.at | 1 + tests/variables.at | 41 +- tw.color.c | 256 +- tw.comp.c | 21 +- tw.decls.h | 3 +- tw.parse.c | 16 +- win32/CODING | 20 - win32/ChangeLog | 686 --- win32/Contributors | 15 - win32/Makefile.win32 | 14 +- win32/README.NT | 107 +- win32/WindowsReadme.1st | 556 -- win32/clip.c | 11 +- win32/dirent.c | 11 +- win32/fork.c | 15 +- win32/globals.c | 8 +- win32/ntfunc.c | 28 +- win32/ntport.h | 3 +- win32/signal.c | 35 +- win32/stdio.c | 20 +- win32/support.c | 38 +- 132 files changed, 15663 insertions(+), 4170 deletions(-) create mode 100644 Makefile.man2html create mode 100644 aclocal.m4 rename configure.in => configure.ac (94%) delete mode 100755 cygwin/postinstall.sh delete mode 100755 cygwin/preremove.sh create mode 100644 dotlock.c create mode 100644 dotlock.h create mode 100644 tcsh.man.new create mode 100644 tests/parenthesis.at delete mode 100644 win32/CODING delete mode 100644 win32/ChangeLog delete mode 100644 win32/Contributors delete mode 100644 win32/WindowsReadme.1st diff --git a/Copyright b/Copyright index 6ba10c49aadb..b5049c7f2fb0 100644 --- a/Copyright +++ b/Copyright @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/Fixes b/Fixes index 8eac9d46fed4..7440349aa483 100644 --- a/Fixes +++ b/Fixes @@ -1,3 +1,95 @@ + 20. V6.20.00 - 20161124 + 19. Don't resize the screen if it did not change size. + 18. V6.19.01 - 20161025 + 17. restore file description when cleaning up after eval: + repeat 99 time + 16. PR/572: Fix $SHLVL issue when exec'ing subshells. + 15. PR/403: Fix backquote expansion for multi-byte character sets. + 14. Fix drawing issu with multi-line prompt (Kensuke Iwahashi/David Kaspar) + 13. always send prusage to stdout. + 12. PR/526: Fix double \\ printing from previous fix in history expansion. + 11. Android updates from Corinna Vinschen + 10. PR/526: Quote backslashes properly so they can be preserved in `` + expansions + 9. Fix memory leak for paraml + 8. Add notempty and ask values for the noclobber setting (Martin Tournoij) + 7. more correct $wordchars for vimode (Luke Mewburn) + 6. expose VImode in $vimode (Luke Mewburn) + 5. display what the compiled in editor is in bindkey -d (Luke Mewburn) + 4. run-fg-editor improvements and documentation (Luke Mewburn) + 3. Fix parsing of 'if (cond)then' (Fridolin Pokorny) + 2. PR/437: Fix handling of invalid unicode characters. + 1. PR/451: Fix error messages containing %c to be always '%c' + + 41. V6.19.00 - 20150521 + 40. V6.18.05 - 20150510 + 39. fix reseting when interrupted inside an eval "eval sleep 10^C" + (paulo.cesar.pereira.de.andrade) + 38. rename handle_intr -> handle_interrupt as originally intended. + 37. fix input tests that need stdin on a tty + 36. V6.18.04 - 20150504 + 35. revert fix echo "\1", it is incorrect. + 34. revert fix to PR/437, breaks short strings. + 33. V6.18.03 - 20150503 + 32. PR/437: Nakajima Akira: Fix segmentation fault reading input files + 31. PR/291: Print job status messages to stderr. + 30. Fridolin Pokorny NUL in `` does not mean EOF. + 29. Pavel Raiskup fix hang with: + while (1) + ( date & ; wait ) + end + 28. Add cdtohome special variable (Martin Tournoij) + 27. Fix root prompt char for windows (Corinna Vinschen) + 26. For "next" completion matches only consider exact matches of the previous + word (Jamie Landeg-Jones) + 25. Fix echo "\1" for echo_style=both where the first character was + not processed properly (Gary Duzan) + 24. V6.18.02 - 20140618 + 23. fix ls-F /non printing exit value twice. + 22. rename configure.in to configure.ac, add aclocal.m4 to CVS + 21. set foo="aabaabaa"; echo $foo:as/a// should produce bb + 20. Add locked merge history support (Marcin Konarski) + 19. Support more resource limits from various BSD's + 18. Cache history count to speed up thing + 17. PR/240: minix support + 16. revert fix for 15. Causes extra quoting, for example (foo is a program + that prints its arguments): + $ ./foo 'abc' * + '\a\b\c' + 15. fix globbing for ``, stripping backslashes. Example: + cat << _EOF > huh + echo 'hello\;world' + _EOF + echo `./huh 0` + echo `./huh $?` + 14. fix for `` that causes hang. Example: + cat << _EOF > huh + #!/bin/sh + echo "[$@]" + echo "I am running" + echo "I am running ($$)" >> huh.out + _EOF + cat << _EOF > huh.tcsh + #!/bin/tcsh -f + + ./huh \ + `#comment blah blah blah` \ + parameter a \ + `#comment blah blah blah` \ + parameter b \ + `#comment blah blah blah` \ + parameter c + echo ok + _EOF + 13. remove AsciiOnly fix now that the real issue has been fixed (Roman Kollar) + 12. define utmp file for aix (Laurence Darby) + 11. fix if history in loops + 10. make ls-F print to stderr and set the exit code + 9. make rmstar interruptible on linux + 8. Get rid of pret_t and make the printf functions return the number of + characters printed as the system ones do. + 7. Parse a FreeBSD compat $LSCOLORS. What to do when both LSCOLORS and + LS_COLORS are set. I am not documenting this until we decide. 6. V6.18.01 - 20120214 5. fix interruptible wait again 4. ignore bogus compiler overflow message diff --git a/Imakefile b/Imakefile index 7bedd7182636..d16dcfa46fb7 100644 --- a/Imakefile +++ b/Imakefile @@ -1,5 +1,5 @@ XCOMM -XCOMM $tcsh: Imakefile,v 1.87 2010/01/28 19:01:05 christos Exp $ +XCOMM $tcsh: Imakefile,v 1.88 2014/07/07 20:34:58 christos Exp $ XCOMM XCOMM Imakefile for tcsh 6.12 XCOMM Marc Horowitz, MIT SIPB @@ -526,8 +526,8 @@ MISCF = Makefile.std Fixes MAKEDIFFS MAKESHAR NewThings README FAQ \ WishList config_f.h eight-bit.me glob.3 patchlevel.h \ pathnames.h tcsh.man Ported src.desc Imakefile imake.config \ README.imake complete.tcsh vmsreadme.txt Makefile.vms termcap.vms \ - snames.h host.defs gethost.c tcsh.man2html Makefile.in configure.in \ - Makefile.win32 + snames.h host.defs gethost.c tcsh.man2html Makefile.in configure.ac \ + Makefile.win32 aclocal.m4 CONFSRCS=config/[a-z]* diff --git a/Makefile.in b/Makefile.in index cff1487ee070..f641b7d99972 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,4 +1,4 @@ -# $tcsh: Makefile.in,v 3.49 2011/02/05 17:35:31 christos Exp $ +# $tcsh: Makefile.in,v 3.59 2015/08/24 20:09:04 kim Exp $ # Makefile.in 4.3 6/11/83 # # C Shell with process control; VM/UNIX VAX Makefile @@ -315,8 +315,8 @@ CPP = @CPP@ # on the suns does not know how to make dynamically linked binaries. # This is set by autoconf. CC = @CC@ -#CC= gcc -Wall -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith -Werror -Wmissing-declarations -Wredundant-decls -Wnested-externs -Wsign-compare -Wcast-qual -Wreturn-type -Wswitch -Wshadow -Wwrite-strings -Wextra -# -ansi -pedantic +#CC= gcc -Wall -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith -Werror -Wmissing-declarations -Wredundant-decls -Wnested-externs -Wsign-compare -Wcast-qual -Wreturn-type -Wswitch -Wshadow -Wwrite-strings -Wextra -Wcast-qual -Wwrite-strings -Wold-style-definition -Wuninitialized -Wpointer-sign +# -Wconversion -Wformat=2 -ansi -pedantic #CC= gcc -Wall -pipe -B/bin/ # Generate code for Intel 486 (linux) #CC= gcc -m486 -pipe -Wall @@ -377,14 +377,14 @@ ASSRCS= sh.c sh.dir.c sh.dol.c sh.err.c sh.exec.c sh.char.c \ sh.lex.c sh.misc.c sh.parse.c sh.print.c sh.proc.c sh.sem.c \ sh.set.c sh.time.c sh.char.h sh.dir.h sh.proc.h sh.h \ tw.color.c -PSSRCS= sh.decls.h glob.c glob.h mi.termios.c mi.wait.h mi.varargs.h ma.setp.c \ +PSSRCS= sh.decls.h glob.c glob.h dotlock.c dotlock.h mi.termios.c mi.wait.h mi.varargs.h ma.setp.c \ vms.termcap.c SHSRCS= ${ASSRCS} ${PSSRCS} SHOBJS= sh.${SUF} sh.dir.${SUF} sh.dol.${SUF} sh.err.${SUF} sh.exec.${SUF} \ sh.char.${SUF} sh.exp.${SUF} sh.file.${SUF} sh.func.${SUF} \ sh.glob.${SUF} sh.hist.${SUF} sh.init.${SUF} sh.lex.${SUF} \ sh.misc.${SUF} sh.parse.${SUF} sh.print.${SUF} sh.proc.${SUF} \ - sh.sem.${SUF} sh.set.${SUF} sh.time.${SUF} glob.${SUF} \ + sh.sem.${SUF} sh.set.${SUF} sh.time.${SUF} glob.${SUF} dotlock.${SUF} \ mi.termios.${SUF} ma.setp.${SUF} vms.termcap.${SUF} TWSRCS= tw.decls.h tw.h tw.help.c tw.init.c tw.parse.c tw.spell.c \ @@ -411,12 +411,12 @@ AVSRCS= Fixes MAKEDIFFS MAKESHAR NewThings README FAQ \ WishList config_f.h eight-bit.me glob.3 patchlevel.h \ pathnames.h tcsh.man Ported src.desc Imakefile imake.config \ README.imake complete.tcsh vmsreadme.txt termcap.vms snames.h \ - host.defs gethost.c tcsh.man2html configure.in configure config.h.in \ - tests/testsuite.at + host.defs gethost.c tcsh.man2html configure.ac configure config.h.in \ + tests/testsuite.at aclocal.m4 TESTFILES= tests/aliases.at tests/arguments.at tests/commands.at \ tests/expr.at tests/lexical.at tests/mb-eucjp.at \ - tests/mb-utf8.at tests/noexec.at tests/syntax.at tests/subst.at \ - tests/variables.at tests/sh.dol.at + tests/mb-utf8.at tests/noexec.at tests/parenthesis.at tests/syntax.at \ + tests/subst.at tests/variables.at tests/sh.dol.at VHSRCS=${PVSRCS} ${AVSRCS} @@ -533,11 +533,11 @@ tc.const.h: tc.const.c sh.char.h config.h config_f.h sh.types.h sh.err.h ${CPP} $(CPPFLAGS) ${DFLAGS} ${EXTRAFLAGS} -D_h_tc_const\ $(srcdir)/tc.const.c | \ sed -n -e 's/^\(Char STR[a-zA-Z0-9_]*\) *\[ *\].*/extern \1[];/p' | \ - sort >> $@.tmp + LC_COLLATE=C sort >> $@.tmp @echo '#endif /* _h_tc_const */' >> $@.tmp @if [ -f $@ ] && cmp -s $@.tmp $@; then echo $@ unchanged.; rm -f $@.tmp; else mv -f $@.tmp $@; echo $@ recreated.; fi -$(srcdir)/tests/package.m4: $(srcdir)/configure.in +$(srcdir)/tests/package.m4: $(srcdir)/configure.ac { \ echo '# Signature of the current package.'; \ echo 'm4_define([AT_PACKAGE_NAME], [@PACKAGE_NAME@])'; \ @@ -594,12 +594,12 @@ vgrind: @vgrind -t -x -h Index index >/crp/bill/csh/index.t install-strip: install + -strip ${DESTBIN}/tcsh$(EXEEXT) install: tcsh$(EXEEXT) install.catalogs install.man -mkdir -p ${DESTBIN} -mv -f ${DESTBIN}/tcsh$(EXEEXT) ${DESTBIN}/tcsh.old cp tcsh$(EXEEXT) ${DESTBIN}/tcsh$(EXEEXT) - -strip ${DESTBIN}/tcsh$(EXEEXT) chmod 755 ${DESTBIN}/tcsh$(EXEEXT) install.catalogs: @@ -623,25 +623,6 @@ install.man: tcsh.man # nroff -man tcsh.man | compress > ${DESTMAN}/tcsh.${MANSECT}.Z # chmod 444 ${DESTMAN}/tcsh.${MANSECT}.Z -install.cygwin: install - -gzip ${DESTMAN}/tcsh.${MANSECT} - -mkdir -p ${DESTDIR}${prefix}/share/doc/tcsh - cp ${srcdir}/FAQ ${srcdir}/Fixes ${DESTDIR}${prefix}/share/doc/tcsh - cp ${srcdir}/NewThings ${srcdir}/README ${DESTDIR}${prefix}/share/doc/tcsh - cp ${srcdir}/WishList ${srcdir}/Y2K ${DESTDIR}${prefix}/share/doc/tcsh - perl ${srcdir}/tcsh.man2html ${srcdir}/tcsh.man - cp -rp tcsh.html ${DESTDIR}${prefix}/share/doc/tcsh - -mkdir -p ${DESTDIR}/etc/defaults/etc/profile.d - -mkdir -p ${DESTDIR}/etc/profile.d - -mkdir -p ${DESTDIR}/etc/postinstall - -mkdir -p ${DESTDIR}/etc/preremove - cp -p ${srcdir}/cygwin/csh.cshrc ${DESTDIR}/etc/defaults/etc - cp -p ${srcdir}/cygwin/csh.login ${DESTDIR}/etc/defaults/etc - cp -p ${srcdir}/cygwin/bindkey.tcsh ${DESTDIR}/etc/defaults/etc/profile.d - cp -p ${srcdir}/complete.tcsh ${DESTDIR}/etc/defaults/etc/profile.d - cp -p ${srcdir}/cygwin/postinstall.sh ${DESTDIR}/etc/postinstall/tcsh.sh - cp -p ${srcdir}/cygwin/preremove.sh ${DESTDIR}/etc/preremove/tcsh.sh - clean: clean.catalogs ${RM} -f a.out strings x.c xs.c tcsh$(EXEEXT) tcsh.a _MAKE_LOG gethost ${RM} -f *.${SUF} *.i *.s @@ -748,11 +729,11 @@ ftp: tcsh-${VERSION}.tar.Z tcsh.tahoe-${VERSION}.tar.Z autoconfigure: $(srcdir)/configure $(srcdir)/config.h.in -$(srcdir)/configure: $(srcdir)/configure.in +$(srcdir)/configure: $(srcdir)/configure.ac cd $(srcdir) && autoconf $(srcdir)/config.h.in: $(srcdir)/stamp-h.in -$(srcdir)/stamp-h.in: $(srcdir)/configure.in +$(srcdir)/stamp-h.in: $(srcdir)/configure.ac cd $(srcdir) && autoheader @echo timestamp > $(srcdir)/stamp-h.in @@ -787,6 +768,9 @@ ${TWOBJS} ${TWINC}: ${TWH} # glob.h glob.${SUF} sh.glob.${SUF}: glob.h +# dotlock.h +dotlock.${SUF}: dotlock.h + # ed.defns.h EDDINC=tc.bind.${SUF} tc.func.${SUF} tc.os.${SUF} ${EDOBJS} ${EDDINC}: ed.defns.h diff --git a/Makefile.man2html b/Makefile.man2html new file mode 100644 index 000000000000..a1bd86ad9737 --- /dev/null +++ b/Makefile.man2html @@ -0,0 +1,17 @@ +# +# Create the HTML version of the manual page +# + +CGI=tcsh.html/tcsh.cgi + +tcsh.html/top.html: tcsh.man tcsh.man2html + perl tcsh.man2html -i + -rm -f tcsh.html/index.html + chmod -R a+rX tcsh.html + mv ${CGI} ${CGI}.bak + sed -e '1s,^.*$$,#!/usr/bin/perl,' < ${CGI}.bak > ${CGI} + chmod a+rx ${CGI} + rm -f ${CGI}.bak + +clean: + -rm -rf tcsh.html diff --git a/Makefile.std b/Makefile.std index 1af09d927778..9d68f0bdaec2 100644 --- a/Makefile.std +++ b/Makefile.std @@ -1,4 +1,4 @@ -# $tcsh: Makefile.std,v 1.97 2006/03/02 18:46:44 christos Exp $ +# $tcsh: Makefile.std,v 1.100 2015/08/24 20:09:04 kim Exp $ # Makefile.std 4.3 6/11/83 # # C Shell with process control; VM/UNIX VAX Makefile @@ -287,14 +287,14 @@ ASSRCS= sh.c sh.dir.c sh.dol.c sh.err.c sh.exec.c sh.char.c \ sh.exp.c sh.file.c sh.func.c sh.glob.c sh.hist.c sh.init.c \ sh.lex.c sh.misc.c sh.parse.c sh.print.c sh.proc.c sh.sem.c \ sh.set.c sh.time.c sh.char.h sh.dir.h sh.proc.h sh.h -PSSRCS= sh.decls.h glob.c glob.h mi.termios.c mi.wait.h mi.varargs.h ma.setp.c \ +PSSRCS= sh.decls.h glob.c glob.h dotlock.c dotlock.h mi.termios.c mi.wait.h mi.varargs.h ma.setp.c \ vms.termcap.c SHSRCS= ${ASSRCS} ${PSSRCS} SHOBJS= sh.${SUF} sh.dir.${SUF} sh.dol.${SUF} sh.err.${SUF} sh.exec.${SUF} \ sh.char.${SUF} sh.exp.${SUF} sh.file.${SUF} sh.func.${SUF} \ sh.glob.${SUF} sh.hist.${SUF} sh.init.${SUF} sh.lex.${SUF} \ sh.misc.${SUF} sh.parse.${SUF} sh.print.${SUF} sh.proc.${SUF} \ - sh.sem.${SUF} sh.set.${SUF} sh.time.${SUF} glob.${SUF} \ + sh.sem.${SUF} sh.set.${SUF} sh.time.${SUF} glob.${SUF} dotlock.${SUF} \ mi.termios.${SUF} ma.setp.${SUF} vms.termcap.${SUF} TWSRCS= tw.decls.h tw.h tw.help.c tw.init.c tw.parse.c tw.spell.c \ @@ -321,7 +321,8 @@ AVSRCS= Fixes MAKEDIFFS MAKESHAR NewThings README FAQ \ WishList config_f.h eight-bit.me glob.3 patchlevel.h \ pathnames.h tcsh.man Ported src.desc Imakefile imake.config \ README.imake complete.tcsh vmsreadme.txt termcap.vms snames.h \ - host.defs gethost.c tcsh.man2html configure.in configure config.h.in + host.defs gethost.c tcsh.man2html configure.ac configure config.h.in \ + aclocal.m4 VHSRCS=${PVSRCS} ${AVSRCS} @@ -424,7 +425,7 @@ tc.const.h: tc.const.c sh.char.h config.h config_f.h sh.types.h sh.err.h ${CPP} $(INCLUDES) ${DFLAGS} ${EXTRAFLAGS} -D_h_tc_const\ $(srcdir)/tc.const.c | grep 'Char STR' | \ sed -e 's/Char \([a-zA-Z0-9_]*\) *\[ *\].*/extern Char \1[];/' | \ - sort >> $@ + LC_COLLATE=C sort >> $@ @echo '#endif /* _h_tc_const */' >> $@ csh.prof: ${OBJS} sh.prof.${SUF} mcrt0.${SUF} @@ -584,11 +585,11 @@ ftp: tcsh-${VERSION}.tar.Z tcsh.tahoe-${VERSION}.tar.Z autoconfigure: $(srcdir)/configure $(srcdir)/config.h.in -$(srcdir)/configure: $(srcdir)/configure.in +$(srcdir)/configure: $(srcdir)/configure.ac cd $(srcdir) && autoconf $(srcdir)/config.h.in: $(srcdir)/stamp-h.in -$(srcdir)/stamp-h.in: $(srcdir)/configure.in +$(srcdir)/stamp-h.in: $(srcdir)/configure.ac cd $(srcdir) && autoheader @echo timestamp > $(srcdir)/stamp-h.in @@ -620,6 +621,9 @@ ${TWOBJS} ${TWINC}: ${TWH} # glob.h glob.${SUF} sh.glob.${SUF}: glob.h +# dotlock.h +dotlock.${SUF}: dotlock.h + # ed.defns.h EDDINC=tc.bind.${SUF} tc.func.${SUF} tc.os.${SUF} ${EDOBJS} ${EDDINC}: ed.defns.h diff --git a/Makefile.vms b/Makefile.vms index d3a258b671a1..57618885e9c7 100644 --- a/Makefile.vms +++ b/Makefile.vms @@ -1,4 +1,4 @@ -# $tcsh: Makefile.vms,v 1.39 2006/03/02 18:46:44 christos Exp $ +# $tcsh: Makefile.vms,v 1.40 2014/07/07 20:34:58 christos Exp $ # Makefile.vms 4.3 6/11/83 # # C Shell with process control; VM/UNIX VAX Makefile @@ -299,7 +299,7 @@ AVSRCS= Fixes MAKEDIFFS MAKESHAR NewThings README FAQ \ WishList config_f.h eight-bit.me glob.3 patchlevel.h \ pathnames.h tcsh.man Ported src.desc Imakefile imake.config \ README.imake complete.tcsh vmsreadme.txt termcap.vms snames.h \ - host.defs gethost.c tcsh.man2html configure.in + host.defs gethost.c tcsh.man2html configure.ac aclocal.m4 VHSRCS=${PVSRCS} ${AVSRCS} diff --git a/README b/README index b05f58993ef9..77693cdae3fa 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -This is tcsh version 6.18.01. Tcsh is a version of the Berkeley +This is tcsh version 6.20.00. Tcsh is a version of the Berkeley C-Shell, with the addition of: a command line editor, command and file name completion, listing, etc. and a bunch of small additions to the shell itself. diff --git a/aclocal.m4 b/aclocal.m4 new file mode 100644 index 000000000000..39fd2c7905a6 --- /dev/null +++ b/aclocal.m4 @@ -0,0 +1,1409 @@ +# generated automatically by aclocal 1.15 -*- Autoconf -*- + +# Copyright (C) 1996-2014 Free Software Foundation, Inc. + +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) +# iconv.m4 serial 19 (gettext-0.18.2) +dnl Copyright (C) 2000-2002, 2007-2014 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Bruno Haible. + +AC_DEFUN([AM_ICONV_LINKFLAGS_BODY], +[ + dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) + AC_REQUIRE([AC_LIB_RPATH]) + + dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV + dnl accordingly. + AC_LIB_LINKFLAGS_BODY([iconv]) +]) + +AC_DEFUN([AM_ICONV_LINK], +[ + dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and + dnl those with the standalone portable GNU libiconv installed). + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + + dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV + dnl accordingly. + AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) + + dnl Add $INCICONV to CPPFLAGS before performing the following checks, + dnl because if the user has installed libiconv and not disabled its use + dnl via --without-libiconv-prefix, he wants to use it. The first + dnl AC_LINK_IFELSE will then fail, the second AC_LINK_IFELSE will succeed. + am_save_CPPFLAGS="$CPPFLAGS" + AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV]) + + AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [ + am_cv_func_iconv="no, consider installing GNU libiconv" + am_cv_lib_iconv=no + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[ +#include +#include + ]], + [[iconv_t cd = iconv_open("",""); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd);]])], + [am_cv_func_iconv=yes]) + if test "$am_cv_func_iconv" != yes; then + am_save_LIBS="$LIBS" + LIBS="$LIBS $LIBICONV" + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[ +#include +#include + ]], + [[iconv_t cd = iconv_open("",""); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd);]])], + [am_cv_lib_iconv=yes] + [am_cv_func_iconv=yes]) + LIBS="$am_save_LIBS" + fi + ]) + if test "$am_cv_func_iconv" = yes; then + AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [ + dnl This tests against bugs in AIX 5.1, AIX 6.1..7.1, HP-UX 11.11, + dnl Solaris 10. + am_save_LIBS="$LIBS" + if test $am_cv_lib_iconv = yes; then + LIBS="$LIBS $LIBICONV" + fi + am_cv_func_iconv_works=no + for ac_iconv_const in '' 'const'; do + AC_RUN_IFELSE( + [AC_LANG_PROGRAM( + [[ +#include +#include + +#ifndef ICONV_CONST +# define ICONV_CONST $ac_iconv_const +#endif + ]], + [[int result = 0; + /* Test against AIX 5.1 bug: Failures are not distinguishable from successful + returns. */ + { + iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); + if (cd_utf8_to_88591 != (iconv_t)(-1)) + { + static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */ + char buf[10]; + ICONV_CONST char *inptr = input; + size_t inbytesleft = strlen (input); + char *outptr = buf; + size_t outbytesleft = sizeof (buf); + size_t res = iconv (cd_utf8_to_88591, + &inptr, &inbytesleft, + &outptr, &outbytesleft); + if (res == 0) + result |= 1; + iconv_close (cd_utf8_to_88591); + } + } + /* Test against Solaris 10 bug: Failures are not distinguishable from + successful returns. */ + { + iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646"); + if (cd_ascii_to_88591 != (iconv_t)(-1)) + { + static ICONV_CONST char input[] = "\263"; + char buf[10]; + ICONV_CONST char *inptr = input; + size_t inbytesleft = strlen (input); + char *outptr = buf; + size_t outbytesleft = sizeof (buf); + size_t res = iconv (cd_ascii_to_88591, + &inptr, &inbytesleft, + &outptr, &outbytesleft); + if (res == 0) + result |= 2; + iconv_close (cd_ascii_to_88591); + } + } + /* Test against AIX 6.1..7.1 bug: Buffer overrun. */ + { + iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1"); + if (cd_88591_to_utf8 != (iconv_t)(-1)) + { + static ICONV_CONST char input[] = "\304"; + static char buf[2] = { (char)0xDE, (char)0xAD }; + ICONV_CONST char *inptr = input; + size_t inbytesleft = 1; + char *outptr = buf; + size_t outbytesleft = 1; + size_t res = iconv (cd_88591_to_utf8, + &inptr, &inbytesleft, + &outptr, &outbytesleft); + if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD) + result |= 4; + iconv_close (cd_88591_to_utf8); + } + } +#if 0 /* This bug could be worked around by the caller. */ + /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */ + { + iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); + if (cd_88591_to_utf8 != (iconv_t)(-1)) + { + static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; + char buf[50]; + ICONV_CONST char *inptr = input; + size_t inbytesleft = strlen (input); + char *outptr = buf; + size_t outbytesleft = sizeof (buf); + size_t res = iconv (cd_88591_to_utf8, + &inptr, &inbytesleft, + &outptr, &outbytesleft); + if ((int)res > 0) + result |= 8; + iconv_close (cd_88591_to_utf8); + } + } +#endif + /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is + provided. */ + if (/* Try standardized names. */ + iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1) + /* Try IRIX, OSF/1 names. */ + && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1) + /* Try AIX names. */ + && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) + /* Try HP-UX names. */ + && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) + result |= 16; + return result; +]])], + [am_cv_func_iconv_works=yes], , + [case "$host_os" in + aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; + *) am_cv_func_iconv_works="guessing yes" ;; + esac]) + test "$am_cv_func_iconv_works" = no || break + done + LIBS="$am_save_LIBS" + ]) + case "$am_cv_func_iconv_works" in + *no) am_func_iconv=no am_cv_lib_iconv=no ;; + *) am_func_iconv=yes ;; + esac + else + am_func_iconv=no am_cv_lib_iconv=no + fi + if test "$am_func_iconv" = yes; then + AC_DEFINE([HAVE_ICONV], [1], + [Define if you have the iconv() function and it works.]) + fi + if test "$am_cv_lib_iconv" = yes; then + AC_MSG_CHECKING([how to link with libiconv]) + AC_MSG_RESULT([$LIBICONV]) + else + dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV + dnl either. + CPPFLAGS="$am_save_CPPFLAGS" + LIBICONV= + LTLIBICONV= + fi + AC_SUBST([LIBICONV]) + AC_SUBST([LTLIBICONV]) +]) + +dnl Define AM_ICONV using AC_DEFUN_ONCE for Autoconf >= 2.64, in order to +dnl avoid warnings like +dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required". +dnl This is tricky because of the way 'aclocal' is implemented: +dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN. +dnl Otherwise aclocal's initial scan pass would miss the macro definition. +dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions. +dnl Otherwise aclocal would emit many "Use of uninitialized value $1" +dnl warnings. +m4_define([gl_iconv_AC_DEFUN], + m4_version_prereq([2.64], + [[AC_DEFUN_ONCE( + [$1], [$2])]], + [m4_ifdef([gl_00GNULIB], + [[AC_DEFUN_ONCE( + [$1], [$2])]], + [[AC_DEFUN( + [$1], [$2])]])])) +gl_iconv_AC_DEFUN([AM_ICONV], +[ + AM_ICONV_LINK + if test "$am_cv_func_iconv" = yes; then + AC_MSG_CHECKING([for iconv declaration]) + AC_CACHE_VAL([am_cv_proto_iconv], [ + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[ +#include +#include +extern +#ifdef __cplusplus +"C" +#endif +#if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus) +size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); +#else +size_t iconv(); +#endif + ]], + [[]])], + [am_cv_proto_iconv_arg1=""], + [am_cv_proto_iconv_arg1="const"]) + am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"]) + am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` + AC_MSG_RESULT([ + $am_cv_proto_iconv]) + AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1], + [Define as const if the declaration of iconv() needs const.]) + dnl Also substitute ICONV_CONST in the gnulib generated . + m4_ifdef([gl_ICONV_H_DEFAULTS], + [AC_REQUIRE([gl_ICONV_H_DEFAULTS]) + if test -n "$am_cv_proto_iconv_arg1"; then + ICONV_CONST="const" + fi + ]) + fi +]) + +# lib-ld.m4 serial 6 +dnl Copyright (C) 1996-2003, 2009-2014 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl Subroutines of libtool.m4, +dnl with replacements s/_*LT_PATH/AC_LIB_PROG/ and s/lt_/acl_/ to avoid +dnl collision with libtool.m4. + +dnl From libtool-2.4. Sets the variable with_gnu_ld to yes or no. +AC_DEFUN([AC_LIB_PROG_LD_GNU], +[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld], +[# I'd rather use --version here, but apparently some GNU lds only accept -v. +case `$LD -v 2>&1 /dev/null 2>&1 \ + && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ + || PATH_SEPARATOR=';' + } +fi + +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + AC_MSG_CHECKING([for ld used by $CC]) + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [[\\/]]* | ?:[[\\/]]*) + re_direlt='/[[^/]][[^/]]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'` + while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do + ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + AC_MSG_CHECKING([for GNU ld]) +else + AC_MSG_CHECKING([for non-GNU ld]) +fi +AC_CACHE_VAL([acl_cv_path_LD], +[if test -z "$LD"; then + acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$acl_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + acl_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$acl_cv_path_LD" -v 2>&1 = 1.10 to complain if config.rpath is missing. + m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])]) + AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS + AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld + AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host + AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir + AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [ + CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ + ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh + . ./conftest.sh + rm -f ./conftest.sh + acl_cv_rpath=done + ]) + wl="$acl_cv_wl" + acl_libext="$acl_cv_libext" + acl_shlibext="$acl_cv_shlibext" + acl_libname_spec="$acl_cv_libname_spec" + acl_library_names_spec="$acl_cv_library_names_spec" + acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" + acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" + acl_hardcode_direct="$acl_cv_hardcode_direct" + acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" + dnl Determine whether the user wants rpath handling at all. + AC_ARG_ENABLE([rpath], + [ --disable-rpath do not hardcode runtime library paths], + :, enable_rpath=yes) +]) + +dnl AC_LIB_FROMPACKAGE(name, package) +dnl declares that libname comes from the given package. The configure file +dnl will then not have a --with-libname-prefix option but a +dnl --with-package-prefix option. Several libraries can come from the same +dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar +dnl macro call that searches for libname. +AC_DEFUN([AC_LIB_FROMPACKAGE], +[ + pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) + define([acl_frompackage_]NAME, [$2]) + popdef([NAME]) + pushdef([PACK],[$2]) + pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) + define([acl_libsinpackage_]PACKUP, + m4_ifdef([acl_libsinpackage_]PACKUP, [m4_defn([acl_libsinpackage_]PACKUP)[, ]],)[lib$1]) + popdef([PACKUP]) + popdef([PACK]) +]) + +dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and +dnl the libraries corresponding to explicit and implicit dependencies. +dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. +dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found +dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem. +AC_DEFUN([AC_LIB_LINKFLAGS_BODY], +[ + AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) + pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) + pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])]) + pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) + pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])]) + dnl Autoconf >= 2.61 supports dots in --with options. + pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[m4_translit(PACK,[.],[_])],PACK)]) + dnl By default, look in $includedir and $libdir. + use_additional=yes + AC_LIB_WITH_FINAL_PREFIX([ + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + ]) + AC_ARG_WITH(P_A_C_K[-prefix], +[[ --with-]]P_A_C_K[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib + --without-]]P_A_C_K[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]], +[ + if test "X$withval" = "Xno"; then + use_additional=no + else + if test "X$withval" = "X"; then + AC_LIB_WITH_FINAL_PREFIX([ + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + ]) + else + additional_includedir="$withval/include" + additional_libdir="$withval/$acl_libdirstem" + if test "$acl_libdirstem2" != "$acl_libdirstem" \ + && ! test -d "$withval/$acl_libdirstem"; then + additional_libdir="$withval/$acl_libdirstem2" + fi + fi + fi +]) + dnl Search the library and its dependencies in $additional_libdir and + dnl $LDFLAGS. Using breadth-first-seach. + LIB[]NAME= + LTLIB[]NAME= + INC[]NAME= + LIB[]NAME[]_PREFIX= + dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been + dnl computed. So it has to be reset here. + HAVE_LIB[]NAME= + rpathdirs= + ltrpathdirs= + names_already_handled= + names_next_round='$1 $2' + while test -n "$names_next_round"; do + names_this_round="$names_next_round" + names_next_round= + for name in $names_this_round; do + already_handled= + for n in $names_already_handled; do + if test "$n" = "$name"; then + already_handled=yes + break + fi + done + if test -z "$already_handled"; then + names_already_handled="$names_already_handled $name" + dnl See if it was already located by an earlier AC_LIB_LINKFLAGS + dnl or AC_LIB_HAVE_LINKFLAGS call. + uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'` + eval value=\"\$HAVE_LIB$uppername\" + if test -n "$value"; then + if test "$value" = yes; then + eval value=\"\$LIB$uppername\" + test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value" + eval value=\"\$LTLIB$uppername\" + test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value" + else + dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined + dnl that this library doesn't exist. So just drop it. + : + fi + else + dnl Search the library lib$name in $additional_libdir and $LDFLAGS + dnl and the already constructed $LIBNAME/$LTLIBNAME. + found_dir= + found_la= + found_so= + found_a= + eval libname=\"$acl_libname_spec\" # typically: libname=lib$name + if test -n "$acl_shlibext"; then + shrext=".$acl_shlibext" # typically: shrext=.so + else + shrext= + fi + if test $use_additional = yes; then + dir="$additional_libdir" + dnl The same code as in the loop below: + dnl First look for a shared library. + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi + fi + dnl Then look for a static library. + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext"; then + found_dir="$dir" + found_a="$dir/$libname.$acl_libext" + fi + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + fi + fi + fi + if test "X$found_dir" = "X"; then + for x in $LDFLAGS $LTLIB[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + case "$x" in + -L*) + dir=`echo "X$x" | sed -e 's/^X-L//'` + dnl First look for a shared library. + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi + fi + dnl Then look for a static library. + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext"; then + found_dir="$dir" + found_a="$dir/$libname.$acl_libext" + fi + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + fi + fi + ;; + esac + if test "X$found_dir" != "X"; then + break + fi + done + fi + if test "X$found_dir" != "X"; then + dnl Found the library. + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name" + if test "X$found_so" != "X"; then + dnl Linking with a shared library. We attempt to hardcode its + dnl directory into the executable's runpath, unless it's the + dnl standard /usr/lib. + if test "$enable_rpath" = no \ + || test "X$found_dir" = "X/usr/$acl_libdirstem" \ + || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then + dnl No hardcoding is needed. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" + else + dnl Use an explicit option to hardcode DIR into the resulting + dnl binary. + dnl Potentially add DIR to ltrpathdirs. + dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $found_dir" + fi + dnl The hardcoding into $LIBNAME is system dependent. + if test "$acl_hardcode_direct" = yes; then + dnl Using DIR/libNAME.so during linking hardcodes DIR into the + dnl resulting binary. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" + else + if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then + dnl Use an explicit option to hardcode DIR into the resulting + dnl binary. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" + dnl Potentially add DIR to rpathdirs. + dnl The rpathdirs will be appended to $LIBNAME at the end. + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $found_dir" + fi + else + dnl Rely on "-L$found_dir". + dnl But don't add it if it's already contained in the LDFLAGS + dnl or the already constructed $LIBNAME + haveit= + for x in $LDFLAGS $LIB[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-L$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" + fi + if test "$acl_hardcode_minus_L" != no; then + dnl FIXME: Not sure whether we should use + dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" + dnl here. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" + else + dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH + dnl here, because this doesn't fit in flags passed to the + dnl compiler. So give up. No hardcoding. This affects only + dnl very old systems. + dnl FIXME: Not sure whether we should use + dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" + dnl here. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" + fi + fi + fi + fi + else + if test "X$found_a" != "X"; then + dnl Linking with a static library. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a" + else + dnl We shouldn't come here, but anyway it's good to have a + dnl fallback. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name" + fi + fi + dnl Assume the include files are nearby. + additional_includedir= + case "$found_dir" in + */$acl_libdirstem | */$acl_libdirstem/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` + if test "$name" = '$1'; then + LIB[]NAME[]_PREFIX="$basedir" + fi + additional_includedir="$basedir/include" + ;; + */$acl_libdirstem2 | */$acl_libdirstem2/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` + if test "$name" = '$1'; then + LIB[]NAME[]_PREFIX="$basedir" + fi + additional_includedir="$basedir/include" + ;; + esac + if test "X$additional_includedir" != "X"; then + dnl Potentially add $additional_includedir to $INCNAME. + dnl But don't add it + dnl 1. if it's the standard /usr/include, + dnl 2. if it's /usr/local/include and we are using GCC on Linux, + dnl 3. if it's already present in $CPPFLAGS or the already + dnl constructed $INCNAME, + dnl 4. if it doesn't exist as a directory. + if test "X$additional_includedir" != "X/usr/include"; then + haveit= + if test "X$additional_includedir" = "X/usr/local/include"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + for x in $CPPFLAGS $INC[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-I$additional_includedir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_includedir"; then + dnl Really add $additional_includedir to $INCNAME. + INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir" + fi + fi + fi + fi + fi + dnl Look for dependencies. + if test -n "$found_la"; then + dnl Read the .la file. It defines the variables + dnl dlname, library_names, old_library, dependency_libs, current, + dnl age, revision, installed, dlopen, dlpreopen, libdir. + save_libdir="$libdir" + case "$found_la" in + */* | *\\*) . "$found_la" ;; + *) . "./$found_la" ;; + esac + libdir="$save_libdir" + dnl We use only dependency_libs. + for dep in $dependency_libs; do + case "$dep" in + -L*) + additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` + dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME. + dnl But don't add it + dnl 1. if it's the standard /usr/lib, + dnl 2. if it's /usr/local/lib and we are using GCC on Linux, + dnl 3. if it's already present in $LDFLAGS or the already + dnl constructed $LIBNAME, + dnl 4. if it doesn't exist as a directory. + if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ + && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then + haveit= + if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ + || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + haveit= + for x in $LDFLAGS $LIB[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + dnl Really add $additional_libdir to $LIBNAME. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir" + fi + fi + haveit= + for x in $LDFLAGS $LTLIB[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + dnl Really add $additional_libdir to $LTLIBNAME. + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir" + fi + fi + fi + fi + ;; + -R*) + dir=`echo "X$dep" | sed -e 's/^X-R//'` + if test "$enable_rpath" != no; then + dnl Potentially add DIR to rpathdirs. + dnl The rpathdirs will be appended to $LIBNAME at the end. + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $dir" + fi + dnl Potentially add DIR to ltrpathdirs. + dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $dir" + fi + fi + ;; + -l*) + dnl Handle this in the next round. + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` + ;; + *.la) + dnl Handle this in the next round. Throw away the .la's + dnl directory; it is already contained in a preceding -L + dnl option. + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` + ;; + *) + dnl Most likely an immediate library name. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep" + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep" + ;; + esac + done + fi + else + dnl Didn't find the library; assume it is in the system directories + dnl known to the linker and runtime loader. (All the system + dnl directories known to the linker should also be known to the + dnl runtime loader, otherwise the system is severely misconfigured.) + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" + fi + fi + fi + done + done + if test "X$rpathdirs" != "X"; then + if test -n "$acl_hardcode_libdir_separator"; then + dnl Weird platform: only the last -rpath option counts, the user must + dnl pass all path elements in one option. We can arrange that for a + dnl single library, but not when more than one $LIBNAMEs are used. + alldirs= + for found_dir in $rpathdirs; do + alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" + done + dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl. + acl_save_libdir="$libdir" + libdir="$alldirs" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" + else + dnl The -rpath options are cumulative. + for found_dir in $rpathdirs; do + acl_save_libdir="$libdir" + libdir="$found_dir" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" + done + fi + fi + if test "X$ltrpathdirs" != "X"; then + dnl When using libtool, the option that works for both libraries and + dnl executables is -R. The -R options are cumulative. + for found_dir in $ltrpathdirs; do + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" + done + fi + popdef([P_A_C_K]) + popdef([PACKLIBS]) + popdef([PACKUP]) + popdef([PACK]) + popdef([NAME]) +]) + +dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR, +dnl unless already present in VAR. +dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes +dnl contains two or three consecutive elements that belong together. +AC_DEFUN([AC_LIB_APPENDTOVAR], +[ + for element in [$2]; do + haveit= + for x in $[$1]; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X$element"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + [$1]="${[$1]}${[$1]:+ }$element" + fi + done +]) + +dnl For those cases where a variable contains several -L and -l options +dnl referring to unknown libraries and directories, this macro determines the +dnl necessary additional linker options for the runtime path. +dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL]) +dnl sets LDADDVAR to linker options needed together with LIBSVALUE. +dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed, +dnl otherwise linking without libtool is assumed. +AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS], +[ + AC_REQUIRE([AC_LIB_RPATH]) + AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) + $1= + if test "$enable_rpath" != no; then + if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then + dnl Use an explicit option to hardcode directories into the resulting + dnl binary. + rpathdirs= + next= + for opt in $2; do + if test -n "$next"; then + dir="$next" + dnl No need to hardcode the standard /usr/lib. + if test "X$dir" != "X/usr/$acl_libdirstem" \ + && test "X$dir" != "X/usr/$acl_libdirstem2"; then + rpathdirs="$rpathdirs $dir" + fi + next= + else + case $opt in + -L) next=yes ;; + -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'` + dnl No need to hardcode the standard /usr/lib. + if test "X$dir" != "X/usr/$acl_libdirstem" \ + && test "X$dir" != "X/usr/$acl_libdirstem2"; then + rpathdirs="$rpathdirs $dir" + fi + next= ;; + *) next= ;; + esac + fi + done + if test "X$rpathdirs" != "X"; then + if test -n ""$3""; then + dnl libtool is used for linking. Use -R options. + for dir in $rpathdirs; do + $1="${$1}${$1:+ }-R$dir" + done + else + dnl The linker is used for linking directly. + if test -n "$acl_hardcode_libdir_separator"; then + dnl Weird platform: only the last -rpath option counts, the user + dnl must pass all path elements in one option. + alldirs= + for dir in $rpathdirs; do + alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir" + done + acl_save_libdir="$libdir" + libdir="$alldirs" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + $1="$flag" + else + dnl The -rpath options are cumulative. + for dir in $rpathdirs; do + acl_save_libdir="$libdir" + libdir="$dir" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + $1="${$1}${$1:+ }$flag" + done + fi + fi + fi + fi + fi + AC_SUBST([$1]) +]) + +# lib-prefix.m4 serial 7 (gettext-0.18) +dnl Copyright (C) 2001-2005, 2008-2014 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Bruno Haible. + +dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and +dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't +dnl require excessive bracketing. +ifdef([AC_HELP_STRING], +[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])], +[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])]) + +dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed +dnl to access previously installed libraries. The basic assumption is that +dnl a user will want packages to use other packages he previously installed +dnl with the same --prefix option. +dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate +dnl libraries, but is otherwise very convenient. +AC_DEFUN([AC_LIB_PREFIX], +[ + AC_BEFORE([$0], [AC_LIB_LINKFLAGS]) + AC_REQUIRE([AC_PROG_CC]) + AC_REQUIRE([AC_CANONICAL_HOST]) + AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) + dnl By default, look in $includedir and $libdir. + use_additional=yes + AC_LIB_WITH_FINAL_PREFIX([ + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + ]) + AC_LIB_ARG_WITH([lib-prefix], +[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib + --without-lib-prefix don't search for libraries in includedir and libdir], +[ + if test "X$withval" = "Xno"; then + use_additional=no + else + if test "X$withval" = "X"; then + AC_LIB_WITH_FINAL_PREFIX([ + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + ]) + else + additional_includedir="$withval/include" + additional_libdir="$withval/$acl_libdirstem" + fi + fi +]) + if test $use_additional = yes; then + dnl Potentially add $additional_includedir to $CPPFLAGS. + dnl But don't add it + dnl 1. if it's the standard /usr/include, + dnl 2. if it's already present in $CPPFLAGS, + dnl 3. if it's /usr/local/include and we are using GCC on Linux, + dnl 4. if it doesn't exist as a directory. + if test "X$additional_includedir" != "X/usr/include"; then + haveit= + for x in $CPPFLAGS; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-I$additional_includedir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test "X$additional_includedir" = "X/usr/local/include"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + if test -d "$additional_includedir"; then + dnl Really add $additional_includedir to $CPPFLAGS. + CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir" + fi + fi + fi + fi + dnl Potentially add $additional_libdir to $LDFLAGS. + dnl But don't add it + dnl 1. if it's the standard /usr/lib, + dnl 2. if it's already present in $LDFLAGS, + dnl 3. if it's /usr/local/lib and we are using GCC on Linux, + dnl 4. if it doesn't exist as a directory. + if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then + haveit= + for x in $LDFLAGS; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then + if test -n "$GCC"; then + case $host_os in + linux*) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + dnl Really add $additional_libdir to $LDFLAGS. + LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir" + fi + fi + fi + fi + fi +]) + +dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix, +dnl acl_final_exec_prefix, containing the values to which $prefix and +dnl $exec_prefix will expand at the end of the configure script. +AC_DEFUN([AC_LIB_PREPARE_PREFIX], +[ + dnl Unfortunately, prefix and exec_prefix get only finally determined + dnl at the end of configure. + if test "X$prefix" = "XNONE"; then + acl_final_prefix="$ac_default_prefix" + else + acl_final_prefix="$prefix" + fi + if test "X$exec_prefix" = "XNONE"; then + acl_final_exec_prefix='${prefix}' + else + acl_final_exec_prefix="$exec_prefix" + fi + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" + prefix="$acl_save_prefix" +]) + +dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the +dnl variables prefix and exec_prefix bound to the values they will have +dnl at the end of the configure script. +AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX], +[ + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + $1 + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" +]) + +dnl AC_LIB_PREPARE_MULTILIB creates +dnl - a variable acl_libdirstem, containing the basename of the libdir, either +dnl "lib" or "lib64" or "lib/64", +dnl - a variable acl_libdirstem2, as a secondary possible value for +dnl acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or +dnl "lib/amd64". +AC_DEFUN([AC_LIB_PREPARE_MULTILIB], +[ + dnl There is no formal standard regarding lib and lib64. + dnl On glibc systems, the current practice is that on a system supporting + dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under + dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine + dnl the compiler's default mode by looking at the compiler's library search + dnl path. If at least one of its elements ends in /lib64 or points to a + dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI. + dnl Otherwise we use the default, namely "lib". + dnl On Solaris systems, the current practice is that on a system supporting + dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under + dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or + dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib. + AC_REQUIRE([AC_CANONICAL_HOST]) + acl_libdirstem=lib + acl_libdirstem2= + case "$host_os" in + solaris*) + dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment + dnl . + dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link." + dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the + dnl symlink is missing, so we set acl_libdirstem2 too. + AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit], + [AC_EGREP_CPP([sixtyfour bits], [ +#ifdef _LP64 +sixtyfour bits +#endif + ], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no]) + ]) + if test $gl_cv_solaris_64bit = yes; then + acl_libdirstem=lib/64 + case "$host_cpu" in + sparc*) acl_libdirstem2=lib/sparcv9 ;; + i*86 | x86_64) acl_libdirstem2=lib/amd64 ;; + esac + fi + ;; + *) + searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` + if test -n "$searchpath"; then + acl_save_IFS="${IFS= }"; IFS=":" + for searchdir in $searchpath; do + if test -d "$searchdir"; then + case "$searchdir" in + */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; + */../ | */.. ) + # Better ignore directories of this form. They are misleading. + ;; + *) searchdir=`cd "$searchdir" && pwd` + case "$searchdir" in + */lib64 ) acl_libdirstem=lib64 ;; + esac ;; + esac + fi + done + IFS="$acl_save_IFS" + fi + ;; + esac + test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" +]) + diff --git a/complete.tcsh b/complete.tcsh index 4fb1ad2dd7db..9f040715a1b2 100644 --- a/complete.tcsh +++ b/complete.tcsh @@ -1,5 +1,5 @@ # -# $tcsh: complete.tcsh,v 1.52 2010/05/07 17:54:13 christos Exp $ +# $tcsh: complete.tcsh,v 1.56 2015/07/03 16:52:47 christos Exp $ # example file using the new completion code # # Debian GNU/Linux @@ -20,1209 +20,1262 @@ # Cleanup by Martin A. Godisch . onintr - -if (! $?prompt) goto end +if ( ! $?prompt ) goto end -if ($?tcsh) then - if ($tcsh != 1) then - set rev=$tcsh:r - set rel=$rev:e - set pat=$tcsh:e - set rev=$rev:r +if ( $?tcsh ) then + if ( $tcsh != 1 ) then + set rev=$tcsh:r:r + set rel=$tcsh:r:e + if ( $rev > 6 || ( $rev > 5 && $rel > 1 ) ) then + set _has_complete=1 endif - if ($rev > 5 && $rel > 1) then - set _complete=1 - endif - unset rev rel pat + endif + unset rev rel endif -if ($?_complete) then - set noglob - if ( ! $?hosts ) set hosts - foreach f ("$HOME/.hosts" /usr/local/etc/csh.hosts "$HOME/.rhosts" /etc/hosts.equiv) - if ( -r "$f" ) then - set hosts = ($hosts `grep -v "+" "$f" | grep -E -v "^#" | tr -s " " " " | cut -f 1`) - endif - end - if ( -r "$HOME/.netrc" ) then - set f=`awk '/machine/ { print $2 }' < "$HOME/.netrc"` >& /dev/null - set hosts=($hosts $f) - endif - if ( -r "$HOME/.ssh/known_hosts" ) then - set f=`cat "$HOME/.ssh/known_hosts" | cut -f 1 -d \ ` >& /dev/null - set f=`cat "$HOME/.ssh/known_hosts" | cut -f 1 -d \ | sed -e 's/,/ /g'` >& /dev/null - set hosts=($hosts $f) - endif - unset f - if ( ! $?hosts ) then - set hosts=(hyperion.ee.cornell.edu phaeton.ee.cornell.edu \ - guillemin.ee.cornell.edu vangogh.cs.berkeley.edu \ - ftp.uu.net prep.ai.mit.edu export.lcs.mit.edu \ - labrea.stanford.edu sumex-aim.stanford.edu \ - tut.cis.ohio-state.edu) - endif +if ( ! $?_has_complete ) goto end - complete ywho n/*/\$hosts/ # argument from list in $hosts - complete rsh p/1/\$hosts/ c/-/"(l n)"/ n/-l/u/ N/-l/c/ n/-/c/ p/2/c/ p/*/f/ - complete ssh p/1/\$hosts/ c/-/"(l n)"/ n/-l/u/ N/-l/c/ n/-/c/ p/2/c/ p/*/f/ - complete xrsh p/1/\$hosts/ c/-/"(l 8 e)"/ n/-l/u/ N/-l/c/ n/-/c/ p/2/c/ p/*/f/ - complete rlogin p/1/\$hosts/ c/-/"(l 8 e)"/ n/-l/u/ - complete telnet p/1/\$hosts/ p/2/x:''/ n/*/n/ +if ( ! $?noglob ) set noglob _unset_noglob - complete cd p/1/d/ # Directories only - complete chdir p/1/d/ - complete pushd p/1/d/ - complete popd p/1/d/ - complete pu p/1/d/ - complete po p/1/d/ - complete complete p/1/X/ # Completions only - complete uncomplete n/*/X/ - complete exec p/1/c/ # Commands only - complete trace p/1/c/ - complete strace p/1/c/ - complete which n/*/c/ - complete where n/*/c/ - complete skill p/1/c/ - complete dde p/1/c/ - complete adb c/-I/d/ n/-/c/ N/-/"(core)"/ p/1/c/ p/2/"(core)"/ - complete sdb p/1/c/ - complete dbx c/-I/d/ n/-/c/ N/-/"(core)"/ p/1/c/ p/2/"(core)"/ - complete xdb p/1/c/ - complete gdb n/-d/d/ n/*/c/ - complete ups p/1/c/ - complete set 'c/*=/f/' 'p/1/s/=' 'n/=/f/' - complete unset n/*/s/ - complete alias p/1/a/ # only aliases are valid - complete unalias n/*/a/ - complete xdvi n/*/f:*.dvi/ # Only files that match *.dvi - complete dvips n/*/f:*.dvi/ - if ($?traditional_complete) then - complete tex n/*/f:*.tex/ # Only files that match *.tex - else - complete tex n/*/f:*.{tex,texi}/ # Files that match *.tex and *.texi - endif - complete latex n/*/f:*.{tex,ltx}/ - complete su c/--/"(login fast preserve-environment command shell \ - help version)"/ c/-/"(f l m p c s -)"/ \ - n/{-c,--command}/c/ \ - n@{-s,--shell}@'`cat /etc/shells`'@ n/*/u/ - complete cc c/-[IL]/d/ \ - c@-l@'`\ls -1 /usr/lib/lib*.a | sed s%^.\*/lib%%\;s%\\.a\$%%`'@ \ - c/-/"(o l c g L I D U)"/ n/*/f:*.[coasi]/ - complete acc c/-[IL]/d/ \ - c@-l@'`\ls -1 /usr/lang/SC1.0/lib*.a | sed s%^.\*/lib%%\;s%\\.a\$%%`'@ \ - c/-/"(o l c g L I D U)"/ n/*/f:*.[coasi]/ - complete gcc c/-[IL]/d/ \ - c/-f/"(caller-saves cse-follow-jumps delayed-branch \ - elide-constructors expensive-optimizations \ - float-store force-addr force-mem inline \ - inline-functions keep-inline-functions \ - memoize-lookups no-default-inline \ - no-defer-pop no-function-cse omit-frame-pointer \ - rerun-cse-after-loop schedule-insns \ - schedule-insns2 strength-reduce \ - thread-jumps unroll-all-loops \ - unroll-loops syntax-only all-virtual \ - cond-mismatch dollars-in-identifiers \ - enum-int-equiv no-asm no-builtin \ - no-strict-prototype signed-bitfields \ - signed-char this-is-variable unsigned-bitfields \ - unsigned-char writable-strings call-saved-reg \ - call-used-reg fixed-reg no-common \ - no-gnu-binutils nonnull-objects \ - pcc-struct-return pic PIC shared-data \ - short-enums short-double volatile)"/ \ - c/-W/"(all aggregate-return cast-align cast-qual \ - comment conversion enum-clash error format \ - id-clash-len implicit missing-prototypes \ - no-parentheses pointer-arith return-type shadow \ - strict-prototypes switch uninitialized unused \ - write-strings)"/ \ - c/-m/"(68000 68020 68881 bitfield fpa nobitfield rtd \ - short c68000 c68020 soft-float g gnu unix fpu \ - no-epilogue)"/ \ - c/-d/"(D M N)"/ \ - c/-/"(f W vspec v vpath ansi traditional \ - traditional-cpp trigraphs pedantic x o l c g L \ - I D U O O2 C E H B b V M MD MM i dynamic \ - nodtdlib static nostdinc undef)"/ \ - c/-l/f:*.a/ \ - n/*/f:*.{c,C,cc,o,a,s,i}/ - complete g++ n/*/f:*.{C,cc,o,s,i}/ - complete CC n/*/f:*.{C,cc,cpp,o,s,i}/ - complete rm c/--/"(directory force interactive verbose \ - recursive help version)"/ c/-/"(d f i v r R -)"/ \ - n/*/f:^*.{c,cc,C,h,in}/ # Protect precious files - complete vi n/*/f:^*.[oa]/ - complete bindkey N/-a/b/ N/-c/c/ n/-[ascr]/'x:'/ \ - n/-[svedlr]/n/ c/-[vedl]/n/ c/-/"(a s k c v e d l r)"/\ - n/-k/"(left right up down)"/ p/2-/b/ \ - p/1/'x:'/ +# Old TCSH versions don't define OSTYPE. +# Use a close approximation instead. - complete find n/-fstype/"(nfs 4.2)"/ n/-name/f/ \ - n/-type/"(c b d f p l s)"/ n/-user/u/ n/-group/g/ \ - n/-exec/c/ n/-ok/c/ n/-cpio/f/ n/-ncpio/f/ n/-newer/f/ \ - c/-/"(fstype name perm prune type user nouser \ - group nogroup size inum atime mtime ctime exec \ - ok print ls cpio ncpio newer xdev depth \ - daystart follow maxdepth mindepth noleaf version \ - anewer cnewer amin cmin mmin true false uid gid \ - ilname iname ipath iregex links lname empty path \ - regex used xtype fprint fprint0 fprintf \ - print0 printf not a and o or)"/ \ - n/*/d/ +if ( ! $?OSTYPE ) then + setenv OSTYPE `echo "$HOSTTYPE" | sed -e 's/^(i[3456]86|(amd|x86_)64)-//'` +endif - complete -%* c/%/j/ # fill in the jobs builtin - complete {fg,bg,stop} c/%/j/ p/1/"(%)"// +if ( ! $?hosts ) set hosts - complete limit c/-/"(h)"/ n/*/l/ - complete unlimit c/-/"(h)"/ n/*/l/ +foreach f ( "$HOME/."{,r,ssh/known_}hosts* \ + /usr/local/etc/csh.hosts /etc/hosts.equiv ) + if ( -r "$f" ) then + set hosts=($hosts `sed \ + -e 's/#.*//' \ + -e '/^[+-]@/d' \ + -e 's/^[-+]//' \ + -e 's/[[:space:]].*//' \ + -e 's/,/\n/g' "$f" \ + | sed -e '/^[.:[:xdigit:][:space:]]*$/d'`) + endif +end +unset f - complete -co* p/0/"(compress)"/ # make compress completion - # not ambiguous - if ($?traditional_complete) then - complete zcat n/*/f:*.Z/ - else - # "zcat" may be linked to "compress" or "gzip" - if (-X zcat) then - zcat --version >& /dev/null - if ($status != 0) then - complete zcat n/*/f:*.Z/ - else - complete zcat c/--/"(force help license quiet version)"/ \ - c/-/"(f h L q V -)"/ n/*/f:*.{gz,Z,z,zip}/ - endif - endif - endif +if ( -r "$HOME/.netrc" ) then + set hosts=($hosts `awk '$1 == "machine" { print $2 }' "$HOME/.netrc"`) +endif - complete finger c/*@/\$hosts/ n/*/u/@ - complete ping p/1/\$hosts/ - complete traceroute p/1/\$hosts/ +set hosts=(`echo $hosts | tr ' ' '\012' | sort -u`) - complete {talk,ntalk,phone} p/1/'`users | tr " " "\012" | uniq`'/ \ - n/*/\`who\ \|\ grep\ \$:1\ \|\ awk\ \'\{\ print\ \$2\ \}\'\`/ +if ( ! $#hosts ) then + # This is just a hint for the user. + set hosts=(ftp.funet.fi ftp.gnu.org ftp.uu.net) +endif - complete ftp c/-/"(d i g n v)"/ n/-/\$hosts/ p/1/\$hosts/ n/*/n/ +complete ywho n/*/\$hosts/ # argument from list in $hosts +complete rsh p/1/\$hosts/ c/-/"(l n)"/ n/-l/u/ N/-l/c/ n/-/c/ p/2/c/ p/*/f/ +complete ssh p/1/\$hosts/ c/-/"(l n)"/ n/-l/u/ N/-l/c/ n/-/c/ p/2/c/ p/*/f/ +complete xrsh p/1/\$hosts/ c/-/"(l 8 e)"/ n/-l/u/ N/-l/c/ n/-/c/ p/2/c/ p/*/f/ +complete rlogin p/1/\$hosts/ c/-/"(l 8 e)"/ n/-l/u/ +complete telnet p/1/\$hosts/ p/2/x:''/ n/*/n/ - # this one is simple... - #complete rcp c/*:/f/ C@[./\$~]*@f@ n/*/\$hosts/: - # From Michael Schroeder - # This one will rsh to the file to fetch the list of files! - complete rcp 'c%*@*:%`set q=$:-0;set q="$q:s/@/ /";set q="$q:s/:/ /";set q=($q " ");rsh $q[2] -l $q[1] ls -dp $q[3]\*`%' 'c%*:%`set q=$:-0;set q="$q:s/:/ /";set q=($q " ");rsh $q[1] ls -dp $q[2]\*`%' 'c%*@%$hosts%:' 'C@[./$~]*@f@' 'n/*/$hosts/:' +complete cd p/1/d/ # Directories only +complete chdir p/1/d/ +complete pushd p/1/d/ +complete popd p/1/d/ +complete pu p/1/d/ +complete po p/1/d/ +complete complete p/1/X/ # Completions only +complete uncomplete n/*/X/ +complete exec p/1/c/ # Commands only +complete trace p/1/c/ +complete strace p/1/c/ +complete which n/*/c/ +complete where n/*/c/ +complete skill p/1/c/ +complete dde p/1/c/ +complete adb c/-I/d/ n/-/c/ N/-/"(core)"/ p/1/c/ p/2/"(core)"/ +complete sdb p/1/c/ +complete dbx c/-I/d/ n/-/c/ N/-/"(core)"/ p/1/c/ p/2/"(core)"/ +complete xdb p/1/c/ +complete gdb n/-d/d/ n/*/c/ +complete ups p/1/c/ +complete set 'c/*=/f/' 'p/1/s/=' 'n/=/f/' +complete unset n/*/s/ +complete alias p/1/a/ # only aliases are valid +complete unalias n/*/a/ +complete xdvi n/*/f:*.dvi/ +complete dvips n/*/f:*.dvi/ +complete tex n/*/f:*.{tex,texi}/ +complete latex n/*/f:*.{tex,ltx}/ - complete dd c/--/"(help version)"/ c/[io]f=/f/ \ - c/conv=*,/"(ascii ebcdic ibm block unblock \ - lcase notrunc ucase swab noerror sync)"/,\ - c/conv=/"(ascii ebcdic ibm block unblock \ - lcase notrunc ucase swab noerror sync)"/,\ - c/*=/x:''/ \ - n/*/"(if of conv ibs obs bs cbs files skip file seek count)"/= +complete su \ + c/--/"(login fast preserve-environment command shell help version)"/ \ + c/-/"(f l m p c s -)"/ \ + n/{-c,--command}/c/ \ + n@{-s,--shell}@'`cat /etc/shells`'@ \ + n/*/u/ +complete cc \ + c/-[IL]/d/ \ + c@-l@'`\ls -1 /usr/lib/lib*.a | sed s%^.\*/lib%%\;s%\\.a\$%%`'@ \ + c/-/"(o l c g L I D U)"/ n/*/f:*.[coasi]/ +complete acc \ + c/-[IL]/d/ \ + c@-l@'`\ls -1 /usr/lang/SC1.0/lib*.a | sed s%^.\*/lib%%\;s%\\.a\$%%`'@ \ + c/-/"(o l c g L I D U)"/ n/*/f:*.[coasi]/ +complete gcc \ + c/-[IL]/d/ \ + c/-f/"(caller-saves cse-follow-jumps delayed-branch elide-constructors \ + expensive-optimizations float-store force-addr force-mem inline \ + inline-functions keep-inline-functions memoize-lookups \ + no-default-inline no-defer-pop no-function-cse omit-frame-pointer \ + rerun-cse-after-loop schedule-insns schedule-insns2 strength-reduce \ + thread-jumps unroll-all-loops unroll-loops syntax-only all-virtual \ + cond-mismatch dollars-in-identifiers enum-int-equiv no-asm no-builtin \ + no-strict-prototype signed-bitfields signed-char this-is-variable \ + unsigned-bitfields unsigned-char writable-strings call-saved-reg \ + call-used-reg fixed-reg no-common no-gnu-binutils nonnull-objects \ + pcc-struct-return pic PIC shared-data short-enums short-double \ + volatile)"/ \ + c/-W/"(all aggregate-return cast-align cast-qual comment conversion \ + enum-clash error format id-clash-len implicit missing-prototypes \ + no-parentheses pointer-arith return-type shadow strict-prototypes \ + switch uninitialized unused write-strings)"/ \ + c/-m/"(68000 68020 68881 bitfield fpa nobitfield rtd short c68000 c68020 \ + soft-float g gnu unix fpu no-epilogue)"/ \ + c/-d/"(D M N)"/ \ + c/-/"(f W vspec v vpath ansi traditional traditional-cpp trigraphs pedantic \ + x o l c g L I D U O O2 C E H B b V M MD MM i dynamic nodtdlib static \ + nostdinc undef)"/ \ + c/-l/f:*.a/ \ + n/*/f:*.{c,C,cc,o,a,s,i}/ +complete g++ n/*/f:*.{C,cc,o,s,i}/ +complete CC n/*/f:*.{C,cc,cpp,o,s,i}/ +complete rm \ + c/--/"(directory force interactive verbose recursive help version)"/ \ + c/-/"(d f i v r R -)"/ \ + n/*/f:^*.{c,cc,C,h,in}/ + # Protect precious files +complete vi n/*/f:^*.[oa]/ +complete bindkey \ + N/-a/b/ N/-c/c/ n/-[ascr]/'x:'/ \ + n/-[svedlr]/n/ c/-[vedl]/n/ c/-/"(a s k c v e d l r)"/ \ + n/-k/"(left right up down)"/ p/2-/b/ \ + p/1/'x:'/ - complete nslookup p/1/x:''/ p/2/\$hosts/ +complete find \ + n/-fstype/"(nfs 4.2)"/ \ + n/-name/f/ \ + n/-type/"(c b d f p l s)"/ \ + n/-user/u/ \ + n/-group/g/ \ + n/-exec/c/ \ + n/-ok/c/ \ + n/-cpio/f/ \ + n/-ncpio/f/ \ + n/-newer/f/ \ + c/-/"(fstype name perm prune type user nouser group nogroup size inum \ + atime mtime ctime exec ok print ls cpio ncpio newer xdev depth \ + daystart follow maxdepth mindepth noleaf version anewer cnewer \ + amin cmin mmin true false uid gid ilname iname ipath iregex links \ + lname empty path regex used xtype fprint fprint0 fprintf print0 \ + printf not a and o or)"/ \ + n/*/d/ - complete ar c/[dmpqrtx]/"(c l o u v a b i)"/ p/1/"(d m p q r t x)"// \ - p/2/f:*.a/ p/*/f:*.o/ +complete -%* c/%/j/ # fill in the jobs builtin +complete {fg,bg,stop} c/%/j/ p/1/"(%)"// - # these should be merged with the MH completion hacks below - jgotts - complete {refile,sprev,snext,scan,pick,rmm,inc,folder,show} \ - "c@+@F:$HOME/Mail/@" +complete limit c/-/"(h)"/ n/*/l/ +complete unlimit c/-/"(h)"/ n/*/l/ - # these and interrupt handling from Jaap Vermeulen - complete {rexec,rxexec,rxterm,rmterm} \ - 'p/1/$hosts/' 'c/-/(l L E)/' 'n/-l/u/' 'n/-L/f/' \ - 'n/-E/e/' 'n/*/c/' - complete kill 'c/-/S/' 'c/%/j/' \ - 'n/*/`ps -u $LOGNAME | awk '"'"'{print $1}'"'"'`/' +#complete -co* p/0/"(compress)"/ # make compress completion +# # not ambiguous - # these from Marc Horowitz - complete attach 'n/-mountpoint/d/' 'n/-m/d/' 'n/-type/(afs nfs rvd ufs)/' \ - 'n/-t/(afs nfs rvd ufs)/' 'n/-user/u/' 'n/-U/u/' \ - 'c/-/(verbose quiet force printpath lookup debug map \ - nomap remap zephyr nozephyr readonly write \ - mountpoint noexplicit explicit type mountoptions \ - nosetuid setuid override skipfsck lock user host)/' \ - 'n/-e/f/' 'n/*/()/' - complete hesinfo 'p/1/u/' \ - 'p/2/(passwd group uid grplist pcap pobox cluster \ - filsys sloc service)/' +# "zcat" may be linked to "compress" or "gzip" +if (-X zcat) then + zcat --version >& /dev/null + if ($status != 0) then + complete zcat n/*/f:*.Z/ + else + complete zcat c/--/"(force help license quiet version)"/ \ + c/-/"(f h L q V -)"/ \ + n/*/f:*.{gz,Z,z,zip}/ + endif +endif - # these from E. Jay Berkenbilt - # = isn't always followed by a filename or a path anymore - jgotts - if ($?traditional_complete) then - complete ./configure \ - 'c/--*=/f/' 'c/--{cache-file,prefix,exec-prefix,\ - bindir,sbindir,libexecdir,datadir,\ - sysconfdir,sharedstatedir,localstatedir,\ - libdir,includedir,oldincludedir,infodir,\ - mandir,srcdir}/(=)//' \ - 'c/--/(cache-file verbose prefix exec-prefix bindir \ - sbindir libexecdir datadir sysconfdir \ - sharedstatedir localstatedir libdir \ - includedir oldincludedir infodir mandir \ - srcdir)//' - else - complete ./configure \ - 'c@--{prefix,exec-prefix,bindir,sbindir,libexecdir,datadir,sysconfdir,sharedstatedir,localstatedir,infodir,mandir,srcdir,x-includes,x-libraries}=*@x:'@ \ - 'c/--cachefile=*/x:/' \ - 'c/--{enable,disable,with}-*/x://' \ - 'c/--*=/x://' \ - 'c/--/(prefix= exec-prefix= bindir= \ - sbindir= libexecdir= datadir= sysconfdir= \ - sharedstatedir= localstatedir= infodir= \ - mandir= srcdir= x-includes= x-libraries= cachefile= \ - enable- disable- with- \ - help no-create quiet silent version verbose )//' - endif - complete gs 'c/-sDEVICE=/(x11 cdjmono cdj550 epson eps9high epsonc \ - dfaxhigh dfaxlow laserjet ljet4 sparc pbm \ - pbmraw pgm pgmraw ppm ppmraw bit)/' \ - 'c/-sOutputFile=/f/' 'c/-s/(DEVICE OutputFile)/=' \ - 'c/-d/(NODISPLAY NOPLATFONTS NOPAUSE)/' 'n/*/f/' - complete perl 'n/-S/c/' - complete printenv 'n/*/e/' - complete sccs p/1/"(admin cdc check clean comb deledit delget \ - delta diffs edit enter fix get help info \ - print prs prt rmdel sccsdiff tell unedit \ - unget val what)"/ - complete setenv 'p/1/e/' 'c/*:/f/' +complete finger c/*@/\$hosts/ n/*/u/@ +complete ping p/1/\$hosts/ +complete traceroute p/1/\$hosts/ - # these and method of setting hosts from Kimmo Suominen - if ( -f "$HOME/.mh_profile" && -x "`which folders`" ) then +complete {talk,ntalk,phone} \ + p/1/'`users | tr " " "\012" | uniq`'/ \ + n/*/\`who\ \|\ grep\ \$:1\ \|\ awk\ \'\{\ print\ \$2\ \}\'\`/ - if ( ! $?FOLDERS ) setenv FOLDERS "`folders -fast -recurse`" - if ( ! $?MHA ) setenv MHA "`ali | sed -e '/^ /d' -e 's/:.*//'`" +complete ftp c/-/"(d i g n v)"/ n/-/\$hosts/ p/1/\$hosts/ n/*/n/ - set folders = ( $FOLDERS ) - set mha = ( $MHA ) +# this one is simple... +#complete rcp c/*:/f/ C@[./\$~]*@f@ n/*/\$hosts/: +# From Michael Schroeder +# This one will rsh to the file to fetch the list of files! +complete rcp 'c%*@*:%`set q=$:-0;set q="$q:s/@/ /";set q="$q:s/:/ /";set q=($q " ");rsh $q[2] -l $q[1] ls -dp $q[3]\*`%' 'c%*:%`set q=$:-0;set q="$q:s/:/ /";set q=($q " ");rsh $q[1] ls -dp $q[2]\*`%' 'c%*@%$hosts%:' 'C@[./$~]*@f@' 'n/*/$hosts/:' - complete ali \ - 'c/-/(alias nolist list nonormalize normalize nouser user help)/' \ - 'n,-alias,f,' +complete dd \ + c/--/"(help version)"/ c/[io]f=/f/ \ + c/conv=*,/"(ascii ebcdic ibm block unblock \ + lcase notrunc ucase swab noerror sync)"/,\ + c/conv=/"(ascii ebcdic ibm block unblock \ + lcase notrunc ucase swab noerror sync)"/,\ + c/*=/x:''/ \ + n/*/"(if of conv ibs obs bs cbs files skip file seek count)"/= - complete anno \ - 'c/-/(component noinplace inplace nodate date text help)/' \ - 'c,+,$folders,' \ - 'n,*,`(mark | sed "s/:.*//";echo next cur prev first last)|tr " " "\12" | sort -u`,' +complete nslookup p/1/x:''/ p/2/\$hosts/ - complete burst \ - 'c/-/(noinplace inplace noquiet quiet noverbose verbose help)/' \ - 'c,+,$folders,' \ - 'n,*,`(mark | sed "s/:.*//";echo next cur prev first last)|tr " " "\12" | sort -u`,' +complete ar \ + c/[dmpqrtx]/"(c l o u v a b i)"/ \ + p/1/"(d m p q r t x)"// \ + p/2/f:*.a/ \ + p/*/f:*.o/ - complete comp \ - 'c/-/(draftfolder draftmessage nodraftfolder editor noedit file form nouse use whatnowproc nowhatnowproc help)/' \ - 'c,+,$folders,' \ - 'n,-whatnowproc,c,' \ - 'n,-file,f,'\ - 'n,-form,f,'\ - 'n,*,`(mark | sed "s/:.*//";echo next cur prev first last)|tr " " "\12" | sort -u`,' +# these should be merged with the MH completion hacks below - jgotts +complete {refile,sprev,snext,scan,pick,rmm,inc,folder,show} \ + "c@+@F:$HOME/Mail/@" - complete dist \ - 'c/-/(noannotate annotate draftfolder draftmessage nodraftfolder editor noedit form noinplace inplace whatnowproc nowhatnowproc help)/' \ - 'c,+,$folders,' \ - 'n,-whatnowproc,c,' \ - 'n,-form,f,'\ - 'n,*,`(mark | sed "s/:.*//";echo next cur prev first last)|tr " " "\12" | sort -u`,' +# these and interrupt handling from Jaap Vermeulen +complete {rexec,rxexec,rxterm,rmterm} \ + 'p/1/$hosts/' \ + 'c/-/(l L E)/' \ + 'n/-l/u/' \ + 'n/-L/f/' \ + 'n/-E/e/' \ + 'n/*/c/' +complete kill \ + 'c/-/S/' \ + 'c/%/j/' \ + 'n/*/`ps -u $LOGNAME | awk '"'"'{print $1}'"'"'`/' - complete folder \ - 'c/-/(all nofast fast noheader header nopack pack noverbose verbose norecurse recurse nototal total noprint print nolist list push pop help)/' \ - 'c,+,$folders,' \ - 'n,*,`(mark | sed "s/:.*//";echo next cur prev first last)|tr " " "\12" | sort -u`,' +# these from Marc Horowitz +complete attach \ + 'n/-mountpoint/d/' \ + 'n/-m/d/' \ + 'n/-type/(afs nfs rvd ufs)/' \ + 'n/-t/(afs nfs rvd ufs)/' \ + 'n/-user/u/' \ + 'n/-U/u/' \ + 'c/-/(verbose quiet force printpath lookup debug map nomap remap zephyr \ + nozephyr readonly write mountpoint noexplicit explicit type \ + mountoptions nosetuid setuid override skipfsck lock user host)/' \ + 'n/-e/f/' \ + 'n/*/()/' +complete hesinfo \ + 'p/1/u/' \ + 'p/2/(passwd group uid grplist pcap pobox cluster filsys sloc service)/' - complete folders \ - 'c/-/(all nofast fast noheader header nopack pack noverbose verbose norecurse recurse nototal total noprint print nolist list push pop help)/' \ - 'c,+,$folders,' \ - 'n,*,`(mark | sed "s/:.*//";echo next cur prev first last)|tr " " "\12" | sort -u`,' +complete ./configure \ + 'c@--{prefix,exec-prefix,bindir,sbindir,libexecdir,datadir,sysconfdir,sharedstatedir,localstatedir,infodir,mandir,srcdir,x-includes,x-libraries}=*@x:'@ \ + 'c/--cachefile=*/x:/' \ + 'c/--{enable,disable,with}-*/x://' \ + 'c/--*=/x://' \ + 'c/--/(prefix= exec-prefix= bindir= sbindir= libexecdir= datadir= \ + sysconfdir= sharedstatedir= localstatedir= infodir= mandir= \ + srcdir= x-includes= x-libraries= cachefile= enable- disable- \ + with- help no-create quiet silent version verbose )//' - complete forw \ - 'c/-/(noannotate annotate draftfolder draftmessage nodraftfolder editor noedit filter form noformat format noinplace inplace digest issue volume whatnowproc nowhatnowproc help)/' \ - 'c,+,$folders,' \ - 'n,-whatnowproc,c,' \ - 'n,-filter,f,'\ - 'n,-form,f,'\ - 'n,*,`(mark | sed "s/:.*//";echo next cur prev first last)|tr " " "\12" | sort -u`,' +complete gs \ + 'c/-sDEVICE=/(x11 cdjmono cdj550 epson eps9high epsonc dfaxhigh dfaxlow \ + laserjet ljet4 sparc pbm pbmraw pgm pgmraw ppm ppmraw bit)/' \ + 'c/-sOutputFile=/f/' 'c/-s/(DEVICE OutputFile)/=' \ + 'c/-d/(NODISPLAY NOPLATFONTS NOPAUSE)/' 'n/*/f/' +complete perl 'n/-S/c/' +complete sccs \ + p/1/"(admin cdc check clean comb deledit delget delta diffs edit enter \ + fix get help info print prs prt rmdel sccsdiff tell unedit unget \ + val what)"/ - complete inc \ - 'c/-/(audit file noaudit nochangecur changecur file form format nosilent silent notruncate truncate width help)/' \ - 'c,+,$folders,' \ - 'n,-audit,f,'\ - 'n,-form,f,' +complete printenv 'n/*/e/' +complete setenv 'p/1/e/' 'c/*:/f/' - complete mark \ - 'c/-/(add delete list sequence nopublic public nozero zero help)/' \ - 'c,+,$folders,' \ - 'n,*,`(mark | sed "s/:.*//";echo next cur prev first last)|tr " " "\12" | sort -u`,' +# these and method of setting hosts from Kimmo Suominen +if ( -f "$HOME/.mh_profile" && -X folders ) then + if ( ! $?FOLDERS ) setenv FOLDERS "`folders -fast -recurse`" + if ( ! $?MHA ) setenv MHA "`ali | sed -e '/^ /d' -e 's/:.*//'`" - complete mhmail \ - 'c/-/(body cc from subject help)/' \ - 'n,-cc,$mha,' \ - 'n,-from,$mha,' \ - 'n/*/$mha/' + set folders = ( $FOLDERS ) + set mha = ( $MHA ) - complete mhpath \ - 'c/-/(help)/' \ - 'c,+,$folders,' \ - 'n,*,`(mark | sed "s/:.*//";echo next cur prev first last)|tr " " "\12" | sort -u`,' + complete ali \ + 'c/-/(alias nolist list nonormalize normalize nouser user help)/' \ + 'n,-alias,f,' - complete msgchk \ - 'c/-/(nodate date nonotify notify help)/' + complete anno \ + 'c/-/(component noinplace inplace nodate date text help)/' \ + 'c,+,$folders,' \ + 'n,*,`(mark | sed "s/:.*//" ; echo next cur prev first last)|tr " " "\012" | sort -u`,' - complete msh \ - 'c/-/(prompt noscan scan notopcur topcur help)/' + complete burst \ + 'c/-/(noinplace inplace noquiet quiet noverbose verbose help)/' \ + 'c,+,$folders,' \ + 'n,*,`(mark | sed "s/:.*//" ; echo next cur prev first last)|tr " " "\012" | sort -u`,' - complete next \ - 'c/-/(draft form moreproc nomoreproc length width showproc noshowproc header noheader help)/' \ - 'c,+,$folders,' \ - 'n,-moreproc,c,' \ - 'n,-showproc,c,' \ - 'n,-form,f,' + complete comp \ + 'c/-/(draftfolder draftmessage nodraftfolder editor noedit file form nouse use whatnowproc nowhatnowproc help)/' \ + 'c,+,$folders,' \ + 'n,-whatnowproc,c,' \ + 'n,-file,f,'\ + 'n,-form,f,'\ + 'n,*,`(mark | sed "s/:.*//" ; echo next cur prev first last)|tr " " "\012" | sort -u`,' - complete packf \ - 'c/-/(file help)/' \ - 'c,+,$folders,' \ - 'n,*,`(mark | sed "s/:.*//";echo next cur prev first last)|tr " " "\12" | sort -u`,' + complete dist \ + 'c/-/(noannotate annotate draftfolder draftmessage nodraftfolder editor noedit form noinplace inplace whatnowproc nowhatnowproc help)/' \ + 'c,+,$folders,' \ + 'n,-whatnowproc,c,' \ + 'n,-form,f,'\ + 'n,*,`(mark | sed "s/:.*//" ; echo next cur prev first last)|tr " " "\012" | sort -u`,' - complete pick \ - 'c/-/(and or not lbrace rbrace cc date from search subject to othercomponent after before datefield sequence nopublic public nozero zero nolist list help)/' \ - 'c,+,$folders,' \ - 'n,*,`(mark | sed "s/:.*//";echo next cur prev first last)|tr " " "\12" | sort -u`,' + complete folder \ + 'c/-/(all nofast fast noheader header nopack pack noverbose verbose norecurse recurse nototal total noprint print nolist list push pop help)/' \ + 'c,+,$folders,' \ + 'n,*,`(mark | sed "s/:.*//" ; echo next cur prev first last)|tr " " "\012" | sort -u`,' - complete prev \ - 'c/-/(draft form moreproc nomoreproc length width showproc noshowproc header noheader help)/' \ - 'c,+,$folders,' \ - 'n,-moreproc,c,' \ - 'n,-showproc,c,' \ - 'n,-form,f,' + complete folders \ + 'c/-/(all nofast fast noheader header nopack pack noverbose verbose norecurse recurse nototal total noprint print nolist list push pop help)/' \ + 'c,+,$folders,' \ + 'n,*,`(mark | sed "s/:.*//" ; echo next cur prev first last)|tr " " "\012" | sort -u`,' - complete prompter \ - 'c/-/(erase kill noprepend prepend norapid rapid nodoteof doteof help)/' + complete forw \ + 'c/-/(noannotate annotate draftfolder draftmessage nodraftfolder editor noedit filter form noformat format noinplace inplace digest issue volume whatnowproc nowhatnowproc help)/' \ + 'c,+,$folders,' \ + 'n,-whatnowproc,c,' \ + 'n,-filter,f,'\ + 'n,-form,f,'\ + 'n,*,`(mark | sed "s/:.*//" ; echo next cur prev first last)|tr " " "\012" | sort -u`,' - complete refile \ - 'c/-/(draft nolink link nopreserve preserve src file help)/' \ - 'c,+,$folders,' \ - 'n,-file,f,'\ - 'n,*,`(mark | sed "s/:.*//";echo next cur prev first last)|tr " " "\12" | sort -u`,' + complete inc \ + 'c/-/(audit file noaudit nochangecur changecur file form format nosilent silent notruncate truncate width help)/' \ + 'c,+,$folders,' \ + 'n,-audit,f,'\ + 'n,-form,f,' - complete rmf \ - 'c/-/(nointeractive interactive help)/' \ - 'c,+,$folders,' + complete mark \ + 'c/-/(add delete list sequence nopublic public nozero zero help)/' \ + 'c,+,$folders,' \ + 'n,*,`(mark | sed "s/:.*//" ; echo next cur prev first last)|tr " " "\012" | sort -u`,' - complete rmm \ - 'c/-/(help)/' \ - 'c,+,$folders,' \ - 'n,*,`(mark | sed "s/:.*//";echo next cur prev first last)|tr " " "\12" | sort -u`,' + complete mhmail \ + 'c/-/(body cc from subject help)/' \ + 'n,-cc,$mha,' \ + 'n,-from,$mha,' \ + 'n/*/$mha/' - complete scan \ - 'c/-/(noclear clear form format noheader header width noreverse reverse file help)/' \ - 'c,+,$folders,' \ - 'n,-form,f,'\ - 'n,-file,f,'\ - 'n,*,`(mark | sed "s/:.*//";echo next cur prev first last)|tr " " "\12" | sort -u`,' + complete mhpath \ + 'c/-/(help)/' \ + 'c,+,$folders,' \ + 'n,*,`(mark | sed "s/:.*//" ; echo next cur prev first last)|tr " " "\012" | sort -u`,' - complete send \ - 'c/-/(alias draft draftfolder draftmessage nodraftfolder filter nofilter noformat format noforward forward nomsgid msgid nopush push noverbose verbose nowatch watch width help)/' \ - 'n,-alias,f,'\ - 'n,-filter,f,' + complete msgchk \ + 'c/-/(nodate date nonotify notify help)/' - complete show \ - 'c/-/(draft form moreproc nomoreproc length width showproc noshowproc header noheader help)/' \ - 'c,+,$folders,' \ - 'n,-moreproc,c,' \ - 'n,-showproc,c,' \ - 'n,-form,f,'\ - 'n,*,`(mark | sed "s/:.*//";echo next cur prev first last)|tr " " "\12" | sort -u`,' + complete msh \ + 'c/-/(prompt noscan scan notopcur topcur help)/' - complete sortm \ - 'c/-/(datefield textfield notextfield limit nolimit noverbose verbose help)/' \ - 'c,+,$folders,' \ - 'n,*,`(mark | sed "s/:.*//";echo next cur prev first last)|tr " " "\12" | sort -u`,' + complete next \ + 'c/-/(draft form moreproc nomoreproc length width showproc noshowproc header noheader help)/' \ + 'c,+,$folders,' \ + 'n,-moreproc,c,' \ + 'n,-showproc,c,' \ + 'n,-form,f,' - complete vmh \ - 'c/-/(prompt vmhproc novmhproc help)/' \ - 'n,-vmhproc,c,' + complete packf \ + 'c/-/(file help)/' \ + 'c,+,$folders,' \ + 'n,*,`(mark | sed "s/:.*//" ; echo next cur prev first last)|tr " " "\012" | sort -u`,' - complete whatnow \ - 'c/-/(draftfolder draftmessage nodraftfolder editor noedit prompt help)/' + complete pick \ + 'c/-/(and or not lbrace rbrace cc date from search subject to othercomponent after before datefield sequence nopublic public nozero zero nolist list help)/' \ + 'c,+,$folders,' \ + 'n,*,`(mark | sed "s/:.*//" ; echo next cur prev first last)|tr " " "\012" | sort -u`,' - complete whom \ - 'c/-/(alias nocheck check draft draftfolder draftmessage nodraftfolder help)/' \ - 'n,-alias,f,' + complete prev \ + 'c/-/(draft form moreproc nomoreproc length width showproc noshowproc header noheader help)/' \ + 'c,+,$folders,' \ + 'n,-moreproc,c,' \ + 'n,-showproc,c,' \ + 'n,-form,f,' - complete plum \ - 'c/-/()/' \ - 'c,+,$folders,' \ - 'n,*,`(mark | sed "s/:.*//";echo next cur prev first last)|tr " " "\12" | sort -u`,' + complete prompter \ + 'c/-/(erase kill noprepend prepend norapid rapid nodoteof doteof help)/' - complete mail \ - 'c/-/()/' \ - 'n/*/$mha/' + complete refile \ + 'c/-/(draft nolink link nopreserve preserve src file help)/' \ + 'c,+,$folders,' \ + 'n,-file,f,'\ + 'n,*,`(mark | sed "s/:.*//" ; echo next cur prev first last)|tr " " "\012" | sort -u`,' - endif + complete rmf \ + 'c/-/(nointeractive interactive help)/' \ + 'c,+,$folders,' - #from Dan Nicolaescu - if ( $?MODULESHOME ) then - alias Compl_module 'find ${MODULEPATH:as/:/ /} -name .version -o -name .modulea\* -prune -o -print | sed `echo "-e s@${MODULEPATH:as%:%/\*@@g -e s@%}/\*@@g"`' - complete module 'p%1%(add load unload switch display avail use unuse update purge list clear help initadd initrm initswitch initlist initclear)%' \ - 'n%{unl*,sw*,inits*}%`echo "$LOADEDMODULES:as/:/ /"`%' \ - 'n%{lo*,di*,he*,inita*,initr*}%`eval Compl_module`%' \ - 'N%{sw*,initsw*}%`eval Compl_module`%' 'C%-%(-append)%' 'n%{use,unu*,av*}%d%' 'n%-append%d%' \ - 'C%[^-]*%`eval Compl_module`%' - endif + complete rmm \ + 'c/-/(help)/' \ + 'c,+,$folders,' \ + 'n,*,`(mark | sed "s/:.*//" ; echo next cur prev first last)|tr " " "\012" | sort -u`,' - # from George Cox - complete acroread 'p/*/f:*.{pdf,PDF}/' - complete apachectl 'c/*/(start stop restart fullstatus status graceful \ - configtest help)/' - complete appletviewer 'p/*/f:*.class/' - complete bison 'c/--/(debug defines file-prefix= fixed-output-files \ - help name-prefix= no-lines no-parser output= \ - token-table verbose version yacc)/' \ - 'c/-/(b d h k l n o p t v y V)/' 'n/-b/f/' 'n/-o/f/' \ - 'n/-p/f/' - complete bzcat c/--/"(help test quiet verbose license version)"/ \ + complete scan \ + 'c/-/(noclear clear form format noheader header width noreverse reverse file help)/' \ + 'c,+,$folders,' \ + 'n,-form,f,'\ + 'n,-file,f,'\ + 'n,*,`(mark | sed "s/:.*//" ; echo next cur prev first last)|tr " " "\012" | sort -u`,' + + complete send \ + 'c/-/(alias draft draftfolder draftmessage nodraftfolder filter nofilter noformat format noforward forward nomsgid msgid nopush push noverbose verbose nowatch watch width help)/' \ + 'n,-alias,f,'\ + 'n,-filter,f,' + + complete show \ + 'c/-/(draft form moreproc nomoreproc length width showproc noshowproc header noheader help)/' \ + 'c,+,$folders,' \ + 'n,-moreproc,c,' \ + 'n,-showproc,c,' \ + 'n,-form,f,'\ + 'n,*,`(mark | sed "s/:.*//" ; echo next cur prev first last)|tr " " "\012" | sort -u`,' + + complete sortm \ + 'c/-/(datefield textfield notextfield limit nolimit noverbose verbose help)/' \ + 'c,+,$folders,' \ + 'n,*,`(mark | sed "s/:.*//" ; echo next cur prev first last)|tr " " "\012" | sort -u`,' + + complete vmh \ + 'c/-/(prompt vmhproc novmhproc help)/' \ + 'n,-vmhproc,c,' + + complete whatnow \ + 'c/-/(draftfolder draftmessage nodraftfolder editor noedit prompt help)/' + + complete whom \ + 'c/-/(alias nocheck check draft draftfolder draftmessage nodraftfolder help)/' \ + 'n,-alias,f,' + + complete plum \ + 'c/-/()/' \ + 'c,+,$folders,' \ + 'n,*,`(mark | sed "s/:.*//" ; echo next cur prev first last)|tr " " "\012" | sort -u`,' + + complete mail \ + 'c/-/()/' \ + 'n/*/$mha/' + +endif + +#from Dan Nicolaescu +if ( $?MODULESHOME ) then + alias Compl_module \ + 'find ${MODULEPATH:as/:/ /} -name .version -o -name .modulea\* -prune \ + -o -print | sed `echo "-e s@${MODULEPATH:as%:%/\*@@g -e s@%}/\*@@g"`' + complete module \ + 'p%1%(add load unload switch display avail use unuse update purge list \ + clear help initadd initrm initswitch initlist initclear)%' \ + 'n%{unl*,sw*,inits*}%`echo "$LOADEDMODULES:as/:/ /"`%' \ + 'n%{lo*,di*,he*,inita*,initr*}%`eval Compl_module`%' \ + 'N%{sw*,initsw*}%`eval Compl_module`%' \ + 'C%-%(-append)%' \ + 'n%{use,unu*,av*}%d%' \ + 'n%-append%d%' \ + 'C%[^-]*%`eval Compl_module`%' +endif + +# from George Cox +complete acroread 'p/*/f:*.{pdf,PDF}/' +complete apachectl 'c/*/(start stop restart fullstatus status graceful \ + configtest help)/' +complete appletviewer 'p/*/f:*.class/' +complete bison 'c/--/(debug defines file-prefix= fixed-output-files \ + help name-prefix= no-lines no-parser output= \ + token-table verbose version yacc)/' \ + 'c/-/(b d h k l n o p t v y V)/' \ + 'n/-b/f/' 'n/-o/f/' 'n/-p/f/' +complete bzcat c/--/"(help test quiet verbose license version)"/ \ c/-/"(h t L V -)"/ n/*/f:*.{bz2,tbz}/ - complete bunzip2 c/--/"(help keep force test stdout quiet verbose \ - license version)"/ c/-/"(h k f t c q v L V -)"/ \ +complete bunzip2 c/--/"(help keep force test stdout quiet verbose \ + license version)"/ \ + c/-/"(h k f t c q v L V -)"/ \ n/*/f:*.{bz2,tbz}/ - complete bzip2 c/--/"(help decompress compress keep force test \ - stdout quiet verbose license version small)"/ \ +complete bzip2 c/--/"(help decompress compress keep force test \ + stdout quiet verbose license version small)"/ \ c/-/"(h d z k f t c q v L V s 1 2 3 4 5 6 7 8 9 -)"/ \ n/{-d,--decompress}/f:*.{bz2,tbz}/ \ N/{-d,--decompress}/f:*.{bz2,tbz}/ n/*/f:^*.{bz2,tbz}/ - complete c++ 'p/*/f:*.{c++,cxx,c,cc,C,cpp}/' - complete co 'p@1@`\ls -1a RCS | sed -e "s/\(.*\),v/\1/"`@' - complete crontab 'n/-u/u/' - complete camcontrol 'p/1/(cmd debug defects devlist eject inquiry \ - modepage negotiate periphlist rescan reset start \ - stop tags tur)/' - complete ctlinnd 'p/1/(addhist allow begin cancel changegroup \ - checkfile drop feedinfo flush flushlogs go hangup \ - logmode mode name newgroup param pause readers refile \ - reject reload renumber reserve rmgroup send shutdown \ - kill throttle trace xabort xexec)/' - complete cvs 'c/--/(help help-commands help-synonyms)/' \ - 'p/1/(add admin annotate checkout commit diff \ - edit editors export history import init log login \ - logout rdiff release remove rtag status tag unedit \ - update watch watchers)/' 'n/-a/(edit unedit commit \ - all none)/' 'n/watch/(on off add remove)/' - complete svn 'C@file:///@`'"${HOME}/etc/tcsh/complete.d/svn"'`@@' \ +complete c++ 'p/*/f:*.{c++,cxx,c,cc,C,cpp}/' +complete co 'p@1@`\ls -1a RCS | sed -e "s/\(.*\),v/\1/"`@' +complete crontab 'n/-u/u/' +complete camcontrol 'p/1/(cmd debug defects devlist eject inquiry \ + modepage negotiate periphlist rescan reset \ + start stop tags tur)/' +complete ctlinnd 'p/1/(addhist allow begin cancel changegroup \ + checkfile drop feedinfo flush flushlogs go \ + hangup logmode mode name newgroup param pause \ + readers refile reject reload renumber reserve \ + rmgroup send shutdown kill throttle trace \ + xabort xexec)/' +complete cvs 'c/--/(help help-commands help-synonyms)/' \ + 'p/1/(add admin annotate checkout commit diff edit \ + editors export history import init log login \ + logout rdiff release remove rtag status tag \ + unedit update watch watchers)/' \ + 'n/-a/(edit unedit commit all none)/' \ + 'n/watch/(on off add remove)/' +complete svn 'C@file:///@`'"${HOME}/etc/tcsh/complete.d/svn"'`@@' \ 'n@ls@(file:/// svn+ssh:// svn://)@@' \ - 'n@help@(add blame cat checkout \ - cleanup commit copy delete export help \ - import info list ls lock log merge mkdir \ - move propdel propedit propget proplist \ - propset resolved revert status switch unlock \ - update)@' 'p@1@(add blame cat checkout \ - cleanup commit copy delete export help \ - import info list ls lock log merge mkdir \ - move propdel propedit propget proplist \ - propset resolved revert status switch unlock \ - update)@' - complete cxx 'p/*/f:*.{c++,cxx,c,cc,C,cpp}/' - complete detex 'p/*/f:*.tex/' - complete edquota 'n/*/u/' - complete exec 'p/1/c/' - complete ghostview 'p/*/f:*.ps/' - complete gv 'p/*/f:*.ps/' - complete ifconfig 'p@1@`ifconfig -l`@' 'n/*/(range phase link netmask \ - mtu vlandev vlan metric mediaopt down delete \ - broadcast arp debug)/' - complete imake 'c/-I/d/' - complete ipfw 'p/1/(flush add delete list show zero)/' \ + 'n@help@(add blame cat checkout cleanup commit copy \ + delete export help import info list ls \ + lock log merge mkdir move propdel propedit \ + propget proplist propset resolved revert \ + status switch unlock update)@' \ + 'p@1@(add blame cat checkout cleanup commit copy \ + delete export help import info list ls lock \ + log merge mkdir move propdel propedit propget \ + proplist propset resolved revert status switch \ + unlock update)@' + +complete cxx 'p/*/f:*.{c++,cxx,c,cc,C,cpp}/' +complete detex 'p/*/f:*.tex/' +complete edquota 'n/*/u/' +complete exec 'p/1/c/' +complete ghostview 'p/*/f:*.ps/' +complete gv 'p/*/f:*.ps/' +complete ifconfig 'p@1@`ifconfig -l`@' \ + 'n/*/(range phase link netmask mtu vlandev vlan \ + metric mediaopt down delete broadcast arp debug)/' +complete imake 'c/-I/d/' +complete ipfw 'p/1/(flush add delete list show zero)/' \ 'n/add/(allow permit accept pass deny drop reject \ - reset count skipto num divert port tee port)/' - complete javac 'p/*/f:*.java/' - complete ldif2ldbm 'n/-i/f:*.ldif/' - complete libtool 'c/--mode=/(compile execute finish install link \ - uninstall)/' 'c/--/(config debug dry-run features \ - finish help quiet silent version mode=)/' - complete libtoolize 'c/--/(automake copy debug dry-run force help ltdl \ - ltdl-tar version)/' - complete links 'c/-/(assume-codepage async-dns download-dir \ - format-cache-size ftp-proxy help http-proxy \ - max-connections max-connections-to-host \ - memory-cache-size receive-timeout retries \ - unrestartable-receive-timeout version)/' - complete natd c/-/'(alias_address config deny_incoming dynamic \ - inport interface log log_denied log_facility \ - outport outport port pptpalias proxy_only \ - proxy_rule redirect_address redirect_port \ - reverse same_ports unregistered_only use_sockets \ - verbose)'/ 'n@-interface@`ifconfig -l`@' - complete netstat 'n@-I@`ifconfig -l`@' - complete objdump 'c/--/(adjust-vma= all-headers architecture= \ - archive-headers debugging demangle disassemble \ - disassemble-all disassemble-zeroes dynamic-reloc \ - dynamic-syms endian= file-headers full-contents \ - headers help info line-numbers no-show-raw-insn \ - prefix-addresses private-headers reloc section-headers \ - section=source stabs start-address= stop-address= \ - syms target= version wide)/' \ + reset count skipto num divert port tee port)/' +complete javac 'p/*/f:*.java/' +complete ldif2ldbm 'n/-i/f:*.ldif/' +complete libtool 'c/--mode=/(compile execute finish install link \ + uninstall)/' \ + 'c/--/(config debug dry-run features finish help \ + quiet silent version mode=)/' +complete libtoolize 'c/--/(automake copy debug dry-run force help ltdl \ + ltdl-tar version)/' +complete links 'c/-/(assume-codepage async-dns download-dir \ + format-cache-size ftp-proxy help http-proxy \ + max-connections max-connections-to-host \ + memory-cache-size receive-timeout retries \ + unrestartable-receive-timeout version)/' +complete natd c/-/'(alias_address config deny_incoming dynamic \ + inport interface log log_denied log_facility \ + outport outport port pptpalias proxy_only \ + proxy_rule redirect_address redirect_port \ + reverse same_ports unregistered_only use_sockets \ + verbose)'/ \ + 'n@-interface@`ifconfig -l`@' +complete netstat 'n@-I@`ifconfig -l`@' +complete objdump 'c/--/(adjust-vma= all-headers architecture= \ + archive-headers debugging demangle disassemble \ + disassemble-all disassemble-zeroes dynamic-reloc \ + dynamic-syms endian= file-headers full-contents \ + headers help info line-numbers no-show-raw-insn \ + prefix-addresses private-headers reloc \ + section-headers section=source stabs \ + start-address= stop-address= syms target= \ + version wide)/' \ 'c/-/(a h i f C d D p r R t T x s S l w)/' - complete xmodmap 'c/-/(display help grammar verbose quiet n e pm pk \ - pke pp)/' - complete lynx 'c/-/(accept_all_cookies anonymous assume_charset= \ - assume_local_charset= assume_unrec_charset= auth= base \ - book buried_news cache= case cfg= child cookie_file= \ - cookies core crawl debug_partial display= dump editor= \ - emacskeys enable_scrollback error_file= force_html \ - force_secure forms_options from ftp get_data head help \ - hiddenlinks= historical homepage= image_links index= \ - ismap link= localhost mime_header minimal \ - newschunksize= newsmaxchunk= nobrowse nocc nocolor \ - nofilereferer nolist nolog nopause noprint noredir \ - noreferer nostatus number_links partial partial_thres \ - pauth= popup post_data preparsed print pseudo_inlines \ - raw realm reload restrictions= resubmit_posts rlogin \ - selective show_cursor soft_dquotes source stack_dump \ - startfile_ok tagsoup telnet term= tlog trace traversal \ - underscore useragent= validate verbose version vikeys \ - width=)/' 'c/(http|ftp)/$URLS/' - complete gmake 'c/{--directory=,--include-dir=}/d/' \ +complete xmodmap 'c/-/(display help grammar verbose quiet n e pm pk \ + pke pp)/' +complete lynx 'c/-/(accept_all_cookies anonymous assume_charset= \ + assume_local_charset= assume_unrec_charset= \ + auth= base book buried_news cache= case cfg= \ + child cookie_file= cookies core crawl \ + debug_partial display= dump editor= emacskeys \ + enable_scrollback error_file= force_html \ + force_secure forms_options from ftp get_data \ + head help hiddenlinks= historical homepage= \ + image_links index= ismap link= localhost \ + mime_header minimal newschunksize= \ + newsmaxchunk= nobrowse nocc nocolor \ + nofilereferer nolist nolog nopause noprint \ + noredir noreferer nostatus number_links \ + partial partial_thres pauth= popup post_data \ + preparsed print pseudo_inlines raw realm \ + reload restrictions= resubmit_posts rlogin \ + selective show_cursor soft_dquotes source \ + stack_dump startfile_ok tagsoup telnet term= \ + tlog trace traversal underscore useragent= \ + validate verbose version vikeys width=)/' \ + 'c/(http|ftp)/$URLS/' +complete gmake 'c/{--directory=,--include-dir=}/d/' \ 'c/{--assume-new,--assume-old,--makefile,--new-file,--what-if,--file}/f/' \ 'c/--/(assume-new= assume-old= debug directory= \ - dry-run environment-overrides file= help \ - ignore-errors include-dir= jobs[=N] just-print \ - keep-going load-average[=N] makefile= max-load[=N] \ - new-file= no-builtin-rules no-keep-going \ - no-print-directory old-file= print-data-base \ - print-directory question quiet recon silent stop \ - touch version warn-undefined-variables what-if=)/' \ + dry-run environment-overrides file= help \ + ignore-errors include-dir= jobs[=N] just-print \ + keep-going load-average[=N] makefile= \ + max-load[=N] new-file= no-builtin-rules \ + no-keep-going no-print-directory old-file= \ + print-data-base print-directory question quiet \ + recon silent stop touch version \ + warn-undefined-variables what-if=)/' \ 'n@*@`cat -s GNUMakefile Makefile makefile |& sed -n -e "/No such file/d" -e "s/^\([A-Za-z0-9-]*\):.*/\1/p"`@' \ - 'n/=/f/' 'n/-f/f/' - complete mixer p/1/'(vol bass treble synth pcm speaker mic cd mix \ - pcm2 rec igain ogain line1 line2 line3)'/ \ + 'n/=/f/' \ + 'n/-f/f/' +complete mixer p/1/'(vol bass treble synth pcm speaker mic cd mix \ + pcm2 rec igain ogain line1 line2 line3)'/ \ p@2@'`mixer $:-1 | awk \{\ print\ \$7\ \}`'@ - complete mpg123 'c/--/(2to1 4to1 8bit aggressive au audiodevice \ - auth buffer cdr check doublespeed equalizer frames \ - gain halfspeed headphones left lineout list mix mono \ - proxy quiet random rate reopen resync right scale \ - shuffle single0 single1 skip speaker stdout stereo \ - test verbose wav)/' - complete mysqladmin 'n/*/(create drop extended-status flush-hosts \ - flush-logs flush-status flush-tables flush-privileges \ - kill password ping processlist reload refresh \ - shutdown status variables version)/' - complete mutt "c@-f=@F:${HOME}/Mail/@" \ - n/-a/f/ \ - n/-F/f/ n/-H/f/ \ - n/-s/x:''/ \ - n/-e/x:''/ \ - n@-b@'`cat "${HOME}/.muttrc-alias" | awk '"'"'{print $2 }'"'"\`@ \ - n@-c@'`cat "${HOME}/.muttrc-alias" | awk '"'"'{print $2 }'"'"\`@ \ - n@*@'`cat "${HOME}/.muttrc-alias" | awk '"'"'{print $2 }'"'"\`@ - complete ndc 'n/*/(status dumpdb reload stats trace notrace \ - querylog start stop restart )/' - if ($?traditional_complete) then - complete nm \ - 'c/--/(debug-syms defined-only demangle dynamic \ - extern-only format= help line-numbers no-demangle \ - no-sort numeric-sort portability print-armap \ - print-file-name reverse-sort size-sort undefined-only \ - version)/' 'p/*/f:^*.{h,C,c,cc}/' +complete mpg123 'c/--/(2to1 4to1 8bit aggressive au audiodevice auth \ + buffer cdr check doublespeed equalizer frames \ + gain halfspeed headphones left lineout list \ + mix mono proxy quiet random rate reopen resync \ + right scale shuffle single0 single1 skip \ + speaker stdout stereo test verbose wav)/' +complete mysqladmin 'n/*/(create drop extended-status flush-hosts \ + flush-logs flush-status flush-tables \ + flush-privileges kill password ping \ + processlist reload refresh shutdown status \ + variables version)/' + +complete mutt \ + "c@-f=@F:${HOME}/Mail/@" \ + n/-a/f/ \ + n/-F/f/ \ + n/-H/f/ \ + n/-s/x:''/ \ + n/-e/x:''/ \ + n@-b@'`cat "${HOME}/.muttrc-alias" | awk '"'"'{print $2 }'"'"\`@ \ + n@-c@'`cat "${HOME}/.muttrc-alias" | awk '"'"'{print $2 }'"'"\`@ \ + n@*@'`cat "${HOME}/.muttrc-alias" | awk '"'"'{print $2 }'"'"\`@ + +complete ndc 'n/*/(status dumpdb reload stats trace notrace \ + querylog start stop restart )/' + +complete nm \ + 'c/--radix=/x:/' \ + 'c/--target=/x:/' \ + 'c/--format=/(bsd sysv posix)/n/' \ + 'c/--/(debugsyms extern-only demangle dynamic print-armap \ + print-file-name numeric-sort no-sort reverse-sort \ + size-sort undefined-only portability target= radix= \ + format= defined-only\ line-numbers no-demangle version \ + help)//' \ + 'n/*/f:^*.{h,c,cc,s,S}/' + +complete nmap 'n@-e@`ifconfig -l`@' 'p/*/$hostnames/' +complete perldoc 'n@*@`\ls -1 /usr/libdata/perl/5.*/pod | sed s%\\.pod.\*\$%%`@' +complete postfix 'n/*/(start stop reload abort flush check)/' +complete postmap 'n/1/(hash: regexp:)/' 'c/hash:/f/' 'c/regexp:/f/' +complete rcsdiff 'p@1@`\ls -1a RCS | sed -e "s/\(.*\),v/\1/"`@' +complete X 'c/-/(I a ac allowMouseOpenFail allowNonLocalModInDev \ + allowNonLocalXvidtune ar1 ar2 audit auth bestRefresh \ + bgamma bpp broadcast bs c cc class co core deferglyphs \ + disableModInDev disableVidMode displayID dpi dpms f fc \ + flipPixels fn fp gamma ggamma help indirect kb keeptty \ + ld lf logo ls nolisten string noloadxkb nolock nopn \ + once p pn port probeonly query quiet r rgamma s \ + showconfig sp su t terminate to tst v verbose version \ + weight wm x xkbdb xkbmap)/' +complete users 'c/--/(help version)/' 'p/1/x:""/' +complete vidcontrol 'p/1/(132x25 132x30 132x43 132x50 132x60 40x25 80x25 \ + 80x30 80x43 80x50 80x60 EGA_80x25 EGA_80x43 \ + VESA_132x25 VESA_132x30 VESA_132x43 VESA_132x50 \ + VESA_132x60 VESA_800x600 VGA_320x200 VGA_40x25 \ + VGA_80x25 VGA_80x30 VGA_80x50 VGA_80x60)/' +complete vim 'n/*/f:^*.[oa]/' +complete where 'n/*/c/' +complete which 'n/*/c/' +complete wmsetbg 'c/-/(display D S a b c d e m p s t u w)/' \ + 'c/--/(back-color center colors dither help match \ + maxscale parse scale smooth tile update-domain \ + update-wmaker version workspace)/' +complete xdb 'p/1/c/' +complete xdvi 'c/-/(allowshell debug display expert gamma hushchars \ + hushchecksums hushspecials install interpreter keep \ + margins nogrey noinstall nomakepk noscan paper safer \ + shrinkbuttonn thorough topmargin underlink version)/' \ + 'n/-paper/(a4 a4r a5 a5r)/' 'p/*/f:*.dvi/' +complete xlock 'c/-/(allowaccess allowroot debug description \ + echokeys enablesaver grabmouse grabserver hide inroot \ + install inwindow mono mousemotion nolock remote \ + resetsaver sound timeelapsed use3d usefirst verbose \ + wireframe background batchcount bg bitmap both3d \ + count cycles delay delta3d display dpmsoff \ + dpmsstandby dpmssuspend endCmd erasedelay erasemode \ + erasetime fg font foreground geometry help \ + icongeometry info invalid left3d lockdelay logoutCmd \ + mailCmd mailIcon message messagefile messagefont \ + messagesfile mode name ncolors nice nomailIcon none3d \ + parent password planfont program resources right3d \ + saturation size startCmd timeout username validate \ + version visual)/' 'n/-mode/(ant atlantis ball bat \ + blot bouboule bounce braid bubble bubble3d bug cage \ + cartoon clock coral crystal daisy dclock decay deco \ + demon dilemma discrete drift eyes fadeplot flag flame \ + flow forest galaxy gears goop grav helix hop hyper \ + ico ifs image invert julia kaleid kumppa lament laser \ + life life1d life3d lightning lisa lissie loop lyapunov \ + mandelbrot marquee matrix maze moebius morph3d \ + mountain munch nose pacman penrose petal pipes puzzle \ + pyro qix roll rotor rubik shape sierpinski slip sphere \ + spiral spline sproingies stairs star starfish strange \ + superquadrics swarm swirl tetris thornbird triangle \ + tube turtle vines voters wator wire world worm xjack \ + blank bomb random)/' +complete xfig 'c/-/(display)/' 'p/*/f:*.fig/' +complete wget c/--/"(accept= append-output= background cache= \ + continue convert-links cut-dirs= debug \ + delete-after directory-prefix= domains= \ + dont-remove-listing dot-style= exclude-directories= \ + exclude-domains= execute= follow-ftp \ + force-directories force-html glob= header= help \ + http-passwd= http-user= ignore-length \ + include-directories= input-file= level= mirror \ + no-clobber no-directories no-host-directories \ + no-host-lookup no-parent non-verbose \ + output-document= output-file= passive-ftp \ + proxy-passwd= proxy-user= proxy= quiet quota= \ + recursive reject= relative retr-symlinks save-headers \ + server-response span-hosts spider timeout= \ + timestamping tries= user-agent= verbose version wait=)"/ + +# these from Tom Warzeka + +# this one works but is slow and doesn't descend into subdirectories +# complete cd C@[./\$~]*@d@ \ +# p@1@'`\ls -1F . $cdpath | grep /\$ | sort -u`'@ n@*@n@ + +if ( -r /etc/shells ) then + complete setenv p@1@e@ n@DISPLAY@\$hosts@: n@SHELL@'`cat /etc/shells`'@ +else + complete setenv p@1@e@ n@DISPLAY@\$hosts@: +endif +complete unsetenv n/*/e/ + +set _maildir = /var/mail +if (-r "$HOME/.mailrc") then + complete mail c/-/"(e i f n s u v)"/ c/*@/\$hosts/ \ + "c@+@F:$HOME/Mail@" C@[./\$~]@f@ n/-s/x:''/ \ + n@-u@T:$_maildir@ n/-f/f/ \ + n@*@'`sed -n s/alias//p "$HOME/.mailrc" | \ + tr -s " " " " | cut -f 2`'@ +else + complete mail c/-/"(e i f n s u v)"/ c/*@/\$hosts/ \ + "c@+@F:$HOME/Mail@" C@[./\$~]@f@ n/-s/x:''/ \ + n@-u@T:$_maildir@ n/-f/f/ n/*/u/ +endif +unset _maildir + +if (! $?MANPATH) then + if (-r /usr/share/man) then + setenv MANPATH /usr/share/man: else - complete nm \ - 'c/--radix=/x:/' \ - 'c/--target=/x:/' \ - 'c/--format=/(bsd sysv posix)/n/' \ - 'c/--/(debugsyms extern-only demangle dynamic print-armap \ - print-file-name numeric-sort no-sort reverse-sort \ - size-sort undefined-only portability target= radix= \ - format= defined-only\ line-numbers no-demangle version \ - help)//' \ - 'n/*/f:^*.{h,c,cc,s,S}/' + setenv MANPATH /usr/man: endif - complete nmap 'n@-e@`ifconfig -l`@' 'p/*/$hostnames/' - complete perldoc 'n@*@`\ls -1 /usr/libdata/perl/5.*/pod | sed s%\\.pod.\*\$%%`@' - complete postfix 'n/*/(start stop reload abort flush check)/' - complete postmap 'n/1/(hash: regexp:)/' 'c/hash:/f/' 'c/regexp:/f/' - complete rcsdiff 'p@1@`\ls -1a RCS | sed -e "s/\(.*\),v/\1/"`@' - complete X 'c/-/(I a ac allowMouseOpenFail allowNonLocalModInDev \ - allowNonLocalXvidtune ar1 ar2 audit auth bestRefresh \ - bgamma bpp broadcast bs c cc class co core deferglyphs \ - disableModInDev disableVidMode displayID dpi dpms f fc \ - flipPixels fn fp gamma ggamma help indirect kb keeptty \ - ld lf logo ls nolisten string noloadxkb nolock nopn \ - once p pn port probeonly query quiet r rgamma s \ - showconfig sp su t terminate to tst v verbose version \ - weight wm x xkbdb xkbmap)/' - complete users 'c/--/(help version)/' 'p/1/x:""/' - complete vidcontrol 'p/1/(132x25 132x30 132x43 132x50 132x60 40x25 80x25 \ - 80x30 80x43 80x50 80x60 EGA_80x25 EGA_80x43 \ - VESA_132x25 VESA_132x30 VESA_132x43 VESA_132x50 \ - VESA_132x60 VESA_800x600 VGA_320x200 VGA_40x25 \ - VGA_80x25 VGA_80x30 VGA_80x50 VGA_80x60)/' - complete vim 'n/*/f:^*.[oa]/' - complete where 'n/*/c/' - complete which 'n/*/c/' - complete wmsetbg 'c/-/(display D S a b c d e m p s t u w)/' \ - 'c/--/(back-color center colors dither help match \ - maxscale parse scale smooth tile update-domain \ - update-wmaker version workspace)/' - complete xdb 'p/1/c/' - complete xdvi 'c/-/(allowshell debug display expert gamma hushchars \ - hushchecksums hushspecials install interpreter keep \ - margins nogrey noinstall nomakepk noscan paper safer \ - shrinkbuttonn thorough topmargin underlink version)/' \ - 'n/-paper/(a4 a4r a5 a5r)/' 'p/*/f:*.dvi/' - complete xlock 'c/-/(allowaccess allowroot debug description \ - echokeys enablesaver grabmouse grabserver hide inroot \ - install inwindow mono mousemotion nolock remote \ - resetsaver sound timeelapsed use3d usefirst verbose \ - wireframe background batchcount bg bitmap both3d \ - count cycles delay delta3d display dpmsoff \ - dpmsstandby dpmssuspend endCmd erasedelay erasemode \ - erasetime fg font foreground geometry help \ - icongeometry info invalid left3d lockdelay logoutCmd \ - mailCmd mailIcon message messagefile messagefont \ - messagesfile mode name ncolors nice nomailIcon none3d \ - parent password planfont program resources right3d \ - saturation size startCmd timeout username validate \ - version visual)/' 'n/-mode/(ant atlantis ball bat \ - blot bouboule bounce braid bubble bubble3d bug cage \ - cartoon clock coral crystal daisy dclock decay deco \ - demon dilemma discrete drift eyes fadeplot flag flame \ - flow forest galaxy gears goop grav helix hop hyper \ - ico ifs image invert julia kaleid kumppa lament laser \ - life life1d life3d lightning lisa lissie loop lyapunov \ - mandelbrot marquee matrix maze moebius morph3d \ - mountain munch nose pacman penrose petal pipes puzzle \ - pyro qix roll rotor rubik shape sierpinski slip sphere \ - spiral spline sproingies stairs star starfish strange \ - superquadrics swarm swirl tetris thornbird triangle \ - tube turtle vines voters wator wire world worm xjack \ - blank bomb random)/' - complete xfig 'c/-/(display)/' 'p/*/f:*.fig/' - complete wget c/--/"(accept= append-output= background cache= \ - continue convert-links cut-dirs= debug \ - delete-after directory-prefix= domains= \ - dont-remove-listing dot-style= exclude-directories= \ - exclude-domains= execute= follow-ftp \ - force-directories force-html glob= header= help \ - http-passwd= http-user= ignore-length \ - include-directories= input-file= level= mirror \ - no-clobber no-directories no-host-directories \ - no-host-lookup no-parent non-verbose \ - output-document= output-file= passive-ftp \ - proxy-passwd= proxy-user= proxy= quiet quota= \ - recursive reject= relative retr-symlinks save-headers \ - server-response span-hosts spider timeout= \ - timestamping tries= user-agent= verbose version wait=)"/ - - # these from Tom Warzeka - - # this one works but is slow and doesn't descend into subdirectories - # complete cd C@[./\$~]*@d@ \ - # p@1@'`\ls -1F . $cdpath | grep /\$ | sort -u`'@ n@*@n@ - - if ( -r /etc/shells ) then - complete setenv p@1@e@ n@DISPLAY@\$hosts@: n@SHELL@'`cat /etc/shells`'@ - else - complete setenv p@1@e@ n@DISPLAY@\$hosts@: - endif - complete unsetenv n/*/e/ - - set _maildir = /var/mail - if (-r "$HOME/.mailrc") then - complete mail c/-/"(e i f n s u v)"/ c/*@/\$hosts/ \ - "c@+@F:$HOME/Mail@" C@[./\$~]@f@ n/-s/x:''/ \ - n@-u@T:$_maildir@ n/-f/f/ \ - n@*@'`sed -n s/alias//p "$HOME/.mailrc" | \ - tr -s " " " " | cut -f 2`'@ - else - complete mail c/-/"(e i f n s u v)"/ c/*@/\$hosts/ \ - "c@+@F:$HOME/Mail@" C@[./\$~]@f@ n/-s/x:''/ \ - n@-u@T:$_maildir@ n/-f/f/ n/*/u/ - endif - unset _maildir - - if (! $?MANPATH) then - if (-r /usr/share/man) then - setenv MANPATH /usr/share/man: - else - setenv MANPATH /usr/man: - endif - endif - - if ($?traditional_complete) then - # use of $MANPATH from Dan Nicolaescu - # use of 'find' adapted from Lubomir Host - complete man \ - 'n@1@`set q = "$MANPATH:as%:%/man1 %" ; \ls -1 $q |& sed -e s%^.\*:.\*\$%% -e s%\\.1.\*\$%%`@'\ - 'n@2@`set q = "$MANPATH:as%:%/man2 %" ; \ls -1 $q |& sed -e s%^.\*:.\*\$%% -e s%\\.2.\*\$%%`@'\ - 'n@3@`set q = "$MANPATH:as%:%/man3 %" ; \ls -1 $q |& sed -e s%^.\*:.\*\$%% -e s%\\.3.\*\$%%`@'\ - 'n@4@`set q = "$MANPATH:as%:%/man4 %" ; \ls -1 $q |& sed -e s%^.\*:.\*\$%% -e s%\\.4.\*\$%%`@'\ - 'n@5@`set q = "$MANPATH:as%:%/man5 %" ; \ls -1 $q |& sed -e s%^.\*:.\*\$%% -e s%\\.5.\*\$%%`@'\ - 'n@6@`set q = "$MANPATH:as%:%/man6 %" ; \ls -1 $q |& sed -e s%^.\*:.\*\$%% -e s%\\.6.\*\$%%`@'\ - 'n@7@`set q = "$MANPATH:as%:%/man7 %" ; \ls -1 $q |& sed -e s%^.\*:.\*\$%% -e s%\\.7.\*\$%%`@'\ - 'n@8@`set q = "$MANPATH:as%:%/man8 %" ; \ls -1 $q |& sed -e s%^.\*:.\*\$%% -e s%\\.8.\*\$%%`@'\ - 'n@9@`set q = "$MANPATH:as%:%/man9 %" ; \ls -1 $q |& sed -e s%^.\*:.\*\$%% -e s%\\.9.\*\$%%`@'\ - 'n@0@`set q = "$MANPATH:as%:%/man0 %" ; \ls -1 $q |& sed -e s%^.\*:.\*\$%% -e s%\\.0.\*\$%%`@'\ - 'n@n@`set q = "$MANPATH:as%:%/mann %" ; \ls -1 $q |& sed -e s%^.\*:.\*\$%% -e s%\\.n.\*\$%%`@'\ - 'n@o@`set q = "$MANPATH:as%:%/mano %" ; \ls -1 $q |& sed -e s%^.\*:.\*\$%% -e s%\\.o.\*\$%%`@'\ - 'n@l@`set q = "$MANPATH:as%:%/manl %" ; \ls -1 $q |& sed -e s%^.\*:.\*\$%% -e s%\\.l.\*\$%%`@'\ - 'n@p@`set q = "$MANPATH:as%:%/manp %" ; \ls -1 $q |& sed -e s%^.\*:.\*\$%% -e s%\\.p.\*\$%%`@'\ - c@-@"(- f k M P s S t)"@ n@-f@c@ n@-k@x:''@ n@-[MP]@d@ \ - 'N@-[MP]@`\ls -1 $:-1/man? |& sed -n s%\\..\\+\$%%p`@' \ - 'n@-[sS]@`\ls -1 $MANPATH:as%:% % |& sed -n s%^man%%p | sort -u`@'\ - 'n@*@`find $MANPATH:as%:% % \( -type f -o -type l \) -printf "%f " |& sed -e "s%find: .*: No such file or directory%%" -e "s%\([^\.]\+\)\.\([^ ]*\) %\1 %g"`@' - #n@*@c@ # old way -- commands only - else - complete man n@1@'`\ls -1 /usr/man/man1 | sed s%\\.1.\*\$%%`'@ \ - n@2@'`\ls -1 /usr/man/man2 | sed s%\\.2.\*\$%%`'@ \ - n@3@'`\ls -1 /usr/man/man3 | sed s%\\.3.\*\$%%`'@ \ - n@4@'`\ls -1 /usr/man/man4 | sed s%\\.4.\*\$%%`'@ \ - n@5@'`\ls -1 /usr/man/man5 | sed s%\\.5.\*\$%%`'@ \ - n@6@'`\ls -1 /usr/man/man6 | sed s%\\.6.\*\$%%`'@ \ - n@7@'`\ls -1 /usr/man/man7 | sed s%\\.7.\*\$%%`'@ \ - n@8@'`\ls -1 /usr/man/man8 | sed s%\\.8.\*\$%%`'@ \ - n@9@'`[ -r /usr/man/man9 ] && \ls -1 /usr/man/man9 | sed s%\\.9.\*\$%%`'@ \ - n@0@'`[ -r /usr/man/man0 ] && \ls -1 /usr/man/man0 | sed s%\\.0.\*\$%%`'@ \ - n@new@'`[ -r /usr/man/mann ] && \ls -1 /usr/man/mann | sed s%\\.n.\*\$%%`'@ \ - n@old@'`[ -r /usr/man/mano ] && \ls -1 /usr/man/mano | sed s%\\.o.\*\$%%`'@ \ -n@local@'`[ -r /usr/man/manl ] && \ls -1 /usr/man/manl | sed s%\\.l.\*\$%%`'@ \ -n@public@'`[ -r /usr/man/manp ]&& \ls -1 /usr/man/manp | sed s%\\.p.\*\$%%`'@ \ - c/-/"(- f k P s t)"/ n/-f/c/ n/-k/x:''/ n/-P/d/ \ - N@-P@'`\ls -1 $:-1/man? | sed s%\\..\*\$%%`'@ n/*/c/ - endif - - complete ps c/-t/x:''/ c/-/"(a c C e g k l S t u v w x)"/ \ - n/-k/x:''/ N/-k/x:''/ n/*/x:''/ - complete compress c/-/"(c f v b)"/ n/-b/x:''/ n/*/f:^*.Z/ - complete uncompress c/-/"(c f v)"/ n/*/f:*.Z/ - - complete uuencode p/1/f/ p/2/x:''/ n/*/n/ - complete uudecode c/-/"(f)"/ n/-f/f:*.{uu,UU}/ p/1/f:*.{uu,UU}/ n/*/n/ - - complete xhost c/[+-]/\$hosts/ n/*/\$hosts/ - complete xpdf c/-/"(z g remote raise quit cmap rgb papercolor \ - eucjp t1lib freetype ps paperw paperh level1 \ - upw fullscreen cmd q v h help)"/ \ - n/-z/x:''/ \ - n/-g/x:''/ n/-remote/x:''/ \ - n/-rgb/x:''/ n/-papercolor/x:''/ \ - n/-{t1lib,freetype}/x:''/ \ - n/-ps/x:''/ n/-paperw/x:''/ \ - n/-paperh/x:''/ n/-upw/x:''/ \ - n/-/f:*.{pdf,PDF}/ \ - N/-{z,g,remote,rgb,papercolor,t1lib,freetype,ps,paperw,paperh,upw}/f:*.{pdf,PDF}/ \ - N/-/x:''/ p/1/f:*.{pdf,PDF}/ p/2/x:''/ - - complete tcsh c/-D*=/'x:'/ c/-D/'x:'/ \ - c/-/"(b c d D e f F i l m n q s t v V x X -version)"/ \ - n/-c/c/ n/{-l,--version}/n/ n/*/'f:*.{,t}csh'/ - - complete rpm c/--/"(query verify nodeps nofiles nomd5 noscripts \ - nogpg nopgp install upgrade freshen erase allmatches \ - notriggers repackage test rebuild recompile initdb \ - rebuilddb addsign resign querytags showrc setperms \ - setugids all file group package querybynumber qf \ - triggeredby whatprovides whatrequires changelog \ - configfiles docfiles dump filesbypkg info last list \ - provides queryformat requires scripts state triggers \ - triggerscripts allfiles badreloc excludepath checksig \ - excludedocs force hash ignoresize ignorearch ignoreos \ - includedocs justdb noorder oldpackage percent prefix \ - relocate replace-files replacepkgs buildroot clean \ - nobuild rmsource rmspec short-circuit sign target \ - help version quiet rcfile pipe dbpath root specfile)"/\ - c/-/"(q V K i U F e ba bb bp bc bi bl bs ta tb tp tc \ - ti tl ts a f g p c d l R s h ? v vv -)"/ \ - n/{-f,--file}/f/ n/{-g,--group}/g/ n/--pipe/c/ n/--dbpath/d/ \ - n/--querybynumber/x:''/ n/--triggeredby/x:''/\ - n/--what{provides,requires}/x:''/ n/--root/d/ \ - n/--{qf,queryformat}/x:''/ n/--buildroot/d/ \ - n/--excludepath/x:''/ n/--prefix/x:''/ \ - n/--relocate/x:''/ n/--target/x:''/\ - n/--rcfile/x:''/ n/--specfile/x:''/ \ - n/{-[iUFep],--{install,upgrade,freshen,erase,package}}/f:*.rpm/ - - # these conform to the latest GNU versions available at press time ... - # updates by John Gotts - if (-X emacs) then - # TW note: if your version of GNU Emacs supports the "--version" option, - # uncomment this line and comment the next to automatically - # detect the version, else set "_emacs_ver" to your version. - #set _emacs_ver=`emacs --version | sed -e 's%GNU Emacs %%' -e q | cut -d . -f1-2` - set _emacs_ver=21.3 - set _emacs_dir=`which emacs | sed s%/bin/emacs%%` - complete emacs c/--/"(batch terminal display no-windows no-init-file \ - user debug-init unibyte multibyte version help \ - no-site-file funcall load eval insert kill)"/ \ - c/-/"(t d nw q u f l -)"/ c/+/x:''/ \ - n/{-t,--terminal}/x:''/ n/{-d,--display}/x:''/ \ - n/{-u,--user}/u/ n/{-f,--funcall}/x:''/ \ - n@{-l,--load}@F:$_emacs_dir/share/emacs/$_emacs_ver/lisp@ \ - n/--eval/x:''/ n/--insert/f/ n/*/f:^*[\#~]/ - unset _emacs_ver _emacs_dir - endif - - complete gzcat c/--/"(force help license quiet version)"/ \ - c/-/"(f h L q V -)"/ n/*/f:*.{gz,Z,z,zip}/ - complete gzip c/--/"(stdout to-stdout decompress uncompress \ - force help list license no-name quiet recurse \ - suffix test verbose version fast best)"/ \ - c/-/"(c d f h l L n q r S t v V 1 2 3 4 5 6 7 8 9 -)"/\ - n/{-S,--suffix}/x:''/ \ - n/{-d,--{de,un}compress}/f:*.{gz,Z,z,zip,taz,tgz}/ \ - N/{-d,--{de,un}compress}/f:*.{gz,Z,z,zip,taz,tgz}/ \ - n/*/f:^*.{gz,Z,z,zip,taz,tgz}/ - complete {gunzip,ungzip} c/--/"(stdout to-stdout force help list license \ - no-name quiet recurse suffix test verbose version)"/ \ - c/-/"(c f h l L n q r S t v V -)"/ \ - n/{-S,--suffix}/x:''/ \ - n/*/f:*.{gz,Z,z,zip,taz,tgz}/ - complete zgrep c/-*A/x:'<#_lines_after>'/ c/-*B/x:'<#_lines_before>'/\ - c/-/"(A b B c C e f h i l n s v V w x)"/ \ - p/1/x:''/ N/-*e/f/ \ - n/-*e/x:''/ n/-*f/f/ n/*/f/ - complete zegrep c/-*A/x:'<#_lines_after>'/ c/-*B/x:'<#_lines_before>'/\ - c/-/"(A b B c C e f h i l n s v V w x)"/ \ - p/1/x:''/ N/-*e/f/ \ - n/-*e/x:''/ n/-*f/f/ n/*/f/ - complete zfgrep c/-*A/x:'<#_lines_after>'/ c/-*B/x:'<#_lines_before>'/\ - c/-/"(A b B c C e f h i l n s v V w x)"/ \ - p/1/x:''/ N/-*e/f/ \ - n/-*e/x:''/ n/-*f/f/ n/*/f/ - complete znew c/-/"(f t v 9 P K)"/ n/*/f:*.Z/ - complete zmore n/*/f:*.{gz,Z,z,zip}/ - complete zfile n/*/f:*.{gz,Z,z,zip,taz,tgz}/ - complete ztouch n/*/f:*.{gz,Z,z,zip,taz,tgz}/ - complete zforce n/*/f:^*.{gz,tgz}/ - - complete dcop 'p/1/`$:0`/ /' \ - 'p/2/`$:0 $:1 | awk \{print\ \$1\}`/ /' \ - 'p/3/`$:0 $:1 $:2 | sed "s%.* \(.*\)(.*%\1%"`/ /' - - - complete grep c/-*A/x:'<#_lines_after>'/ c/-*B/x:'<#_lines_before>'/\ - c/--/"(extended-regexp fixed-regexp basic-regexp \ - regexp file ignore-case word-regexp line-regexp \ - no-messages revert-match version help byte-offset \ - line-number with-filename no-filename quiet silent \ - text directories recursive files-without-match \ - files-with-matches count before-context after-context \ - context binary unix-byte-offsets)"/ \ - c/-/"(A a B b C c d E e F f G H h i L l n q r s U u V \ - v w x)"/ \ - p/1/x:''/ N/-*e/f/ \ - n/-*e/x:''/ n/-*f/f/ n/*/f/ - complete egrep c/-*A/x:'<#_lines_after>'/ c/-*B/x:'<#_lines_before>'/\ - c/--/"(extended-regexp fixed-regexp basic-regexp \ - regexp file ignore-case word-regexp line-regexp \ - no-messages revert-match version help byte-offset \ - line-number with-filename no-filename quiet silent \ - text directories recursive files-without-match \ - files-with-matches count before-context after-context \ - context binary unix-byte-offsets)"/ \ - c/-/"(A a B b C c d E e F f G H h i L l n q r s U u V \ - v w x)"/ \ - p/1/x:''/ N/-*e/f/ \ - n/-*e/x:''/ n/-*f/f/ n/*/f/ - complete fgrep c/-*A/x:'<#_lines_after>'/ c/-*B/x:'<#_lines_before>'/\ - c/--/"(extended-regexp fixed-regexp basic-regexp \ - regexp file ignore-case word-regexp line-regexp \ - no-messages revert-match version help byte-offset \ - line-number with-filename no-filename quiet silent \ - text directories recursive files-without-match \ - files-with-matches count before-context after-context \ - context binary unix-byte-offsets)"/ \ - c/-/"(A a B b C c d E e F f G H h i L l n q r s U u V \ - v w x)"/ \ - p/1/x:''/ N/-*e/f/ \ - n/-*e/x:''/ n/-*f/f/ n/*/f/ - - complete sed c/--/"(quiet silent version help expression file)"/ \ - c/-/"(n V e f -)"/ n/{-e,--expression}/x:'