From 23338178da74e9862b8abd49eef83ee891027a1e Mon Sep 17 00:00:00 2001 From: Mark Peek Date: Sun, 24 Apr 2005 19:41:08 +0000 Subject: [PATCH] Import of tcsh-6.14.00 --- contrib/tcsh/Fixes | 90 + contrib/tcsh/Imakefile | 6 +- contrib/tcsh/Makefile.in | 23 +- contrib/tcsh/Makefile.std | 10 +- contrib/tcsh/Makefile.vms | 10 +- contrib/tcsh/README | 13 +- contrib/tcsh/complete.tcsh | 161 +- contrib/tcsh/config.h.in | 206 +- contrib/tcsh/config/bsd4.4 | 37 - contrib/tcsh/config_f.h | 45 +- contrib/tcsh/configure | 4552 ++++++++++++++++++++++++++++++++++-- contrib/tcsh/configure.in | 123 +- contrib/tcsh/ed.chared.c | 591 ++--- contrib/tcsh/ed.decls.h | 249 +- contrib/tcsh/ed.defns.c | 38 +- contrib/tcsh/ed.h | 45 +- contrib/tcsh/ed.init.c | 14 +- contrib/tcsh/ed.inputl.c | 94 +- contrib/tcsh/ed.refresh.c | 615 ++--- contrib/tcsh/ed.screen.c | 208 +- contrib/tcsh/ed.term.c | 8 +- contrib/tcsh/ed.term.h | 4 +- contrib/tcsh/ed.xmap.c | 18 +- contrib/tcsh/gethost.c | 10 +- contrib/tcsh/glob.c | 168 +- contrib/tcsh/glob.h | 4 +- contrib/tcsh/host.defs | 41 +- contrib/tcsh/install-sh | 438 ++-- contrib/tcsh/ma.setp.c | 94 +- contrib/tcsh/nls/C/set11 | 23 +- contrib/tcsh/nls/ja/set1 | 65 +- contrib/tcsh/nls/ja/set3 | 124 + contrib/tcsh/nls/ja/set4 | 45 + contrib/tcsh/nls/ja/set7 | 30 + contrib/tcsh/patchlevel.h | 8 +- contrib/tcsh/sh.c | 183 +- contrib/tcsh/sh.char.h | 93 +- contrib/tcsh/sh.decls.h | 66 +- contrib/tcsh/sh.dir.c | 116 +- contrib/tcsh/sh.dol.c | 181 +- contrib/tcsh/sh.err.c | 16 +- contrib/tcsh/sh.exec.c | 83 +- contrib/tcsh/sh.exp.c | 164 +- contrib/tcsh/sh.file.c | 98 +- contrib/tcsh/sh.func.c | 324 ++- contrib/tcsh/sh.glob.c | 234 +- contrib/tcsh/sh.h | 340 +-- contrib/tcsh/sh.hist.c | 54 +- contrib/tcsh/sh.init.c | 11 +- contrib/tcsh/sh.lex.c | 323 ++- contrib/tcsh/sh.misc.c | 133 +- contrib/tcsh/sh.parse.c | 64 +- contrib/tcsh/sh.print.c | 65 +- contrib/tcsh/sh.proc.c | 154 +- contrib/tcsh/sh.proc.h | 6 +- contrib/tcsh/sh.sem.c | 75 +- contrib/tcsh/sh.set.c | 175 +- contrib/tcsh/sh.time.c | 94 +- contrib/tcsh/sh.types.h | 192 +- contrib/tcsh/tc.alloc.c | 73 +- contrib/tcsh/tc.bind.c | 69 +- contrib/tcsh/tc.const.c | 23 +- contrib/tcsh/tc.decls.h | 70 +- contrib/tcsh/tc.disc.c | 8 +- contrib/tcsh/tc.func.c | 223 +- contrib/tcsh/tc.h | 4 +- contrib/tcsh/tc.nls.c | 304 +++ contrib/tcsh/tc.nls.h | 99 + contrib/tcsh/tc.os.c | 75 +- contrib/tcsh/tc.os.h | 206 +- contrib/tcsh/tc.printf.c | 51 +- contrib/tcsh/tc.prompt.c | 145 +- contrib/tcsh/tc.sched.c | 15 +- contrib/tcsh/tc.sig.c | 34 +- contrib/tcsh/tc.sig.h | 7 +- contrib/tcsh/tc.str.c | 196 +- contrib/tcsh/tc.vers.c | 8 +- contrib/tcsh/tc.wait.h | 8 +- contrib/tcsh/tc.who.c | 149 +- contrib/tcsh/tcsh.man | 90 +- contrib/tcsh/tcsh.man2html | 22 +- contrib/tcsh/tw.color.c | 57 +- contrib/tcsh/tw.comp.c | 39 +- contrib/tcsh/tw.decls.h | 8 +- contrib/tcsh/tw.h | 8 +- contrib/tcsh/tw.help.c | 23 +- contrib/tcsh/tw.init.c | 65 +- contrib/tcsh/tw.parse.c | 133 +- contrib/tcsh/tw.spell.c | 12 +- contrib/tcsh/vms.termcap.c | 17 +- 90 files changed, 9556 insertions(+), 4139 deletions(-) create mode 100644 contrib/tcsh/nls/ja/set3 create mode 100644 contrib/tcsh/nls/ja/set4 create mode 100644 contrib/tcsh/nls/ja/set7 create mode 100644 contrib/tcsh/tc.nls.c create mode 100644 contrib/tcsh/tc.nls.h diff --git a/contrib/tcsh/Fixes b/contrib/tcsh/Fixes index 7b8bf3edb994..384c3295d259 100644 --- a/contrib/tcsh/Fixes +++ b/contrib/tcsh/Fixes @@ -1,3 +1,93 @@ + 76. V6.14.00 - 20050325 + 75. Additional messages for the ja (Japanese) locale (NAKAMURA Takeshi) + 74. V6.13.10 - 20050321 + 73. Implement --help (Tom Warzeka) + 72. Clamp solaris autologout time + 71. Add support for "limit heapsize" (Martin Kraemer) + 70. Improved autoconf for utmp/utmpx (Miloslav Trmac) + 69. V6.13.09 - 20050303 + 68. Autoconf additions (Miloslav Trmac and Jean-Luc Leger) + 67. Fix erroneous sign extension when printing huge numbers (Martin Kraemer) + 66. Handle delay in termcap entries (Martin Kraemer) + 65. EBCDIC and BS2000 fixes (Martin Kraemer) + 64. Avoid the SCCS percent-S-percent sequence differently (Kimmo Suominen) + 63. Mark position update fixes (Martin Kraemer) + 62. Define BSDLIMIT and BSDTIMES for Cygwin (Corinna Vinschen) + 61. Fix NLSFrom prototype (Martin Kraemer) + 60. V6.13.08 - 20050303 + 59. Add test for socklen_t in autoconf + 58. Fix problems with NLSFrom prototype + 57. Deal with AIX's utmpx lossage + 56. V6.13.07 - 20050118 + 55. constifications, XXX: duplicate prototype on setpgrp(). + 54. iconv fixes (Miloslav Trmac) + 53. literal code cleanups (Miloslav Trmac) + 52. move intptr_t definition to sh.h and include both stdint.h and inttypes.h + 51. Fix dup2() issues, and introduce FSAFE as the highest file descriptor + to be left untouched. This is to avoid closing hesiod/nis etc file + descriptors behind their backs. I need to really fix file descriptor + handling one day. + 50. forward<->reverse char conversion verification (Miloslav Trmac) + 49. japanese locale additions (Yoshiyuki Sakakibara) + 48. wide character/utf 8 cleanups (Michael Schroeder) + 47. V6.13.06 - 20050105 + 46. autoconf cleanup (Miloslav Trmac) + 45. Fix literal refresh code (Michael Schroeder) + 44. Fix history printing bug with WIDE_STRINGS + 43. V6.13.05 - 20041121 + 42. deal with not having intptr_t + 41. get rid of bool. + 40. Protect HAVE_ICONV with NLS_CATALOGS + 39. Deal with wchar_t being unsigned. + 38. If we HAVEUTMPX redefine some utmp functions in terms of utmpx ones. + 37. V6.13.04 - 20041120 + 36. Fix display problems with two-column characters when using WIDE_STRINGS. + (Miloslav Trmac) + 35. Change charset declarations for some of the translations. + (Miloslav Trmac) + 34. Set O_LARGEFILE properly (Miloslav Trmac) + 33. Use libc functions to access utmp data (Miloslav Trmac) + 32. t_pmatch() was not really case-insensitive when cs == 8 + (Miloslav Trmac) + 31. Fix escaping of "control" bytes 0x80..0x9F when they are actually + parts of UTF-8 character representation. (Miloslav Trmac) + 30. V6.13.03 - 20041120 + 29. More close_on_exec fixes (Miloslav Trmac) + 28. SUSE dspmbyte fixes (via Harald) + 27. Newline handling in command substitution controlled by csubstnonl + (Miloslav Trmac) + 26. Fix UNC prompt expansion (WIN32) (Yasuhiro Matsumoto) + 25. Fix incorrect xprintf() usage (Miloslav Trmac) + 24. Additional architectures support for $HOSTTYPE and $MACHTYPE + (Miloslav Trmac) + 23. Use nl_langinfo(CODESET) to determine $dspmbyte (Miloslav Trmac) + 22. Complete arguments that contant a # (Steven Grady) + 21. Set close-on-exec in subshells + 20. Compilation fixes (Miloslav Trmac) + 19. V6.13.02 - 20040804 + 18. de-register, de-extern, de-shadow, and const poison. + 17. WIDE_STRINGS support (Miloslav Trmac) + 16. warning cleanups (Miloslav Trmac) + 15. nlsclose() arg passing, exp2 is now a gcc builtin (Mark Peek) + 14. iconv malloc portability fix. + 13. make automatic dspmbyte determination case insensitive + 12. V6.13.01 - 20040724 + 11. bug fix in automatic dspmbyte setting (Miloslav Trmac) + 10. iconv patches (Miloslav Trmac) + 9. cygwin signal fixes; only init 32 signals, don't set bit flag on error; + breaks SIGHUP. (Corinna Vinschen) + 8. Make sure terminal size change takes effect immediately. + 7. Obey $printexitvalue for builtins. + 6. FreeBSD PR/66420: Allow history parsing to be special so that it + can handle inline # characters (Oliver Eikemeier) + 5. new termname builtin from (Andrew Stevenson) + 4. if ($var =~ *[^0-9]*) echo not numeric, fix (Andrew Stevenson) + 3. completion fix to avoid dup hosts from ssh_known_hosts + (Eric D. Hendrickson) + 2. vc++ 7.1 compilation fix (Steve Schockley) + 1. UTF-8 handling for both single and double width characters, but + no combining character support. (Michael Schroeder) + 36. V6.13.00 - 20040519 35. V6.12.03 - 20040322 34. turn on kanji and dspmbyte by default; add check for utf8 locales, diff --git a/contrib/tcsh/Imakefile b/contrib/tcsh/Imakefile index 803ed04b3867..bc77ad9840ab 100644 --- a/contrib/tcsh/Imakefile +++ b/contrib/tcsh/Imakefile @@ -1,5 +1,5 @@ XCOMM -XCOMM $Id: Imakefile,v 1.83 2003/02/08 20:03:25 christos Exp $ +XCOMM $Id: Imakefile,v 1.84 2004/12/25 21:15:05 christos Exp $ XCOMM XCOMM Imakefile for tcsh 6.12 XCOMM Marc Horowitz, MIT SIPB @@ -41,12 +41,12 @@ ones. Please send in your fixes and additions! */ # define ConfigH sysv4 # endif -# ifdef LinuxArchitecture +# if defined(LinuxArchitecture) || defined(GNUArchitecture) # define ConfigH linux # endif # ifdef AlphaArchitecture -# ifndef LinuxArchitecture +# if !defined(LinuxArchitecture) && !defined(GNUArchitecture) # define ConfigH decosf1 # endif # if !HasGcc diff --git a/contrib/tcsh/Makefile.in b/contrib/tcsh/Makefile.in index 7be22bc6ffc9..da0875ff8207 100644 --- a/contrib/tcsh/Makefile.in +++ b/contrib/tcsh/Makefile.in @@ -1,4 +1,4 @@ -# $Id: Makefile.in,v 3.20 2003/03/12 19:14:50 christos Exp $ +# $Id: Makefile.in,v 3.27 2005/03/23 13:20:30 kim Exp $ # Makefile.in 4.3 6/11/83 # # C Shell with process control; VM/UNIX VAX Makefile @@ -247,7 +247,7 @@ CPP = @CPP@ # This is set by autoconf. # The -B tells gcc to use /bin/ld. This is to avoid using the gnu ld, which # on the suns does not know how to make dynamically linked binaries. CC = @CC@ # This is set by autoconf. -#CC= gcc -Wall -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith -Werror +#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 #CC= gcc -Wall -pipe -B/bin/ # -ansi -pedantic #CC= gcc -m486 -pipe -Wall # Generate code for Intel 486 (linux) #CC= shlicc # BSDI2.1 w/ shared libraries @@ -313,11 +313,11 @@ EDOBJS= ed.chared.${SUF} ed.refresh.${SUF} ed.screen.${SUF} ed.init.${SUF} \ ed.inputl.${SUF} ed.defns.${SUF} ed.xmap.${SUF} ed.term.${SUF} TCSRCS= tc.alloc.c tc.bind.c tc.const.c tc.decls.h tc.disc.c \ - tc.func.c tc.os.c tc.os.h tc.printf.c tc.prompt.c \ + tc.func.c tc.nls.c tc.os.c tc.os.h tc.printf.c tc.prompt.c \ tc.sched.c tc.sig.c tc.sig.h tc.str.c sh.types.h tc.vers.c tc.wait.h \ tc.who.c tc.h TCOBJS= tc.alloc.${SUF} tc.bind.${SUF} tc.const.${SUF} tc.defs.${SUF} \ - tc.disc.${SUF} tc.func.${SUF} tc.os.${SUF} tc.printf.${SUF} \ + tc.disc.${SUF} tc.func.${SUF} tc.nls.${SUF} tc.os.${SUF} tc.printf.${SUF} \ tc.prompt.${SUF} tc.sched.${SUF} tc.sig.${SUF} tc.str.${SUF} \ tc.vers.${SUF} tc.who.${SUF} @@ -431,8 +431,8 @@ tc.const.h: tc.const.c sh.char.h config.h config_f.h sh.types.h sh.err.h @echo '#ifndef _h_tc_const' >> $@ @echo '#define _h_tc_const' >> $@ ${CPP} $(CPPFLAGS) ${DFLAGS} ${EXTRAFLAGS} -D_h_tc_const\ - $(srcdir)/tc.const.c | grep 'Char STR' | \ - sed -e 's/Char \([a-zA-Z0-9_]*\) *\[ *\].*/extern Char \1[];/' | \ + $(srcdir)/tc.const.c | \ + sed -n -e 's/^\(Char STR[a-zA-Z0-9_]*\) *\[ *\].*/extern \1[];/p' | \ sort >> $@ @echo '#endif /* _h_tc_const */' >> $@ @@ -514,12 +514,15 @@ install.cygwin: install install.man # chmod 444 ${DESTMAN}/tcsh.${MANSECT}.Z clean: - ${RM} -f a.out strings x.c xs.c tcsh$(EXEEXT) tcsh.a _MAKE_LOG core gethost + ${RM} -f a.out strings x.c xs.c tcsh$(EXEEXT) tcsh.a _MAKE_LOG gethost ${RM} -f *.${SUF} sh.prof.c ed.defns.h tc.const.h sh.err.h tc.defs.c ${RM} -f tcsh.*.m tcsh.*.cat veryclean: clean - ${RM} -f config.h config.status config.cache config.log Makefile tcsh.ps + ${RM} -f Makefile config.h config_p.h + ${RM} -f config.status config.cache config.log tcsh.ps + ${RM} -f missing + ${RM} -rf autom4te.cache ${RM} -f *~ #* distclean: veryclean @@ -623,7 +626,7 @@ $(srcdir)/stamp-h.in: $(srcdir)/configure.in # config.h: config_f.h -TCH=tc.h tc.const.h tc.decls.h tc.os.h tc.sig.h +TCH=tc.h tc.const.h tc.decls.h tc.nls.h tc.os.h tc.sig.h SHH=sh.h sh.types.h sh.char.h sh.err.h sh.dir.h sh.proc.h pathnames.h \ sh.decls.h ${TCH} TWH=tw.h tw.decls.h @@ -640,7 +643,7 @@ ${OBJS}: config.h ${SHH} # TWH TWINC=ed.chared.${SUF} ed.inputl.${SUF} sh.exec.${SUF} sh.func.${SUF} \ - sh.set.${SUF} tc.func.${SUF} tw.color.${SUF} + sh.set.${SUF} tc.func.${SUF} tc.nls.${SUF} tw.color.${SUF} ${TWOBJS} ${TWINC}: ${TWH} # glob.h diff --git a/contrib/tcsh/Makefile.std b/contrib/tcsh/Makefile.std index c114383accf1..69219e3a31db 100644 --- a/contrib/tcsh/Makefile.std +++ b/contrib/tcsh/Makefile.std @@ -1,4 +1,4 @@ -# $Id: Makefile.std,v 1.95 2002/07/23 16:13:21 christos Exp $ +# $Id: Makefile.std,v 1.96 2004/12/25 21:15:05 christos Exp $ # Makefile.std 4.3 6/11/83 # # C Shell with process control; VM/UNIX VAX Makefile @@ -308,11 +308,11 @@ EDOBJS= ed.chared.${SUF} ed.refresh.${SUF} ed.screen.${SUF} ed.init.${SUF} \ ed.inputl.${SUF} ed.defns.${SUF} ed.xmap.${SUF} ed.term.${SUF} TCSRCS= tc.alloc.c tc.bind.c tc.const.c tc.decls.h tc.disc.c \ - tc.func.c tc.os.c tc.os.h tc.printf.c tc.prompt.c \ + tc.func.c tc.nls.c tc.os.c tc.os.h tc.printf.c tc.prompt.c \ tc.sched.c tc.sig.c tc.sig.h tc.str.c sh.types.h tc.vers.c tc.wait.h \ tc.who.c tc.h TCOBJS= tc.alloc.${SUF} tc.bind.${SUF} tc.const.${SUF} tc.defs.${SUF} \ - tc.disc.${SUF} tc.func.${SUF} tc.os.${SUF} tc.printf.${SUF} \ + tc.disc.${SUF} tc.func.${SUF} tc.nls.${SUF} tc.os.${SUF} tc.printf.${SUF} \ tc.prompt.${SUF} tc.sched.${SUF} tc.sig.${SUF} tc.str.${SUF} \ tc.vers.${SUF} tc.who.${SUF} @@ -597,7 +597,7 @@ $(srcdir)/stamp-h.in: $(srcdir)/configure.in # config.h: config_f.h -TCH=tc.h tc.const.h tc.decls.h tc.os.h tc.sig.h +TCH=tc.h tc.const.h tc.decls.h tc.nls.h tc.os.h tc.sig.h SHH=sh.h sh.types.h sh.char.h sh.err.h sh.dir.h sh.proc.h pathnames.h \ sh.decls.h ${TCH} TWH=tw.h tw.decls.h @@ -614,7 +614,7 @@ ${OBJS}: config.h ${SHH} # TWH TWINC=ed.chared.${SUF} ed.inputl.${SUF} sh.exec.${SUF} sh.func.${SUF} \ - sh.set.${SUF} tc.func.${SUF} tw.color.${SUF} + sh.set.${SUF} tc.func.${SUF} tc.nls.${SUF} tw.color.${SUF} ${TWOBJS} ${TWINC}: ${TWH} # glob.h diff --git a/contrib/tcsh/Makefile.vms b/contrib/tcsh/Makefile.vms index 07c8d4a7c818..75d2c95cdbd6 100644 --- a/contrib/tcsh/Makefile.vms +++ b/contrib/tcsh/Makefile.vms @@ -1,4 +1,4 @@ -# $Id: Makefile.vms,v 1.37 2002/07/23 16:13:21 christos Exp $ +# $Id: Makefile.vms,v 1.38 2004/12/25 21:15:05 christos Exp $ # Makefile.vms 4.3 6/11/83 # # C Shell with process control; VM/UNIX VAX Makefile @@ -286,11 +286,11 @@ EDOBJS= ed.chared.${SUF} ed.refresh.${SUF} ed.screen.${SUF} ed.init.${SUF} \ ed.inputl.${SUF} ed.defns.${SUF} ed.xmap.${SUF} ed.term.${SUF} TCSRCS= tc.alloc.c tc.bind.c tc.const.c tc.decls.h tc.disc.c \ - tc.func.c tc.os.c tc.os.h tc.printf.c tc.prompt.c \ + tc.func.c tc.os.c tc.os.c tc.os.h tc.printf.c tc.prompt.c \ tc.sched.c tc.sig.c tc.sig.h tc.str.c sh.types.h tc.vers.c tc.wait.h \ tc.who.c tc.h TCOBJS= tc.alloc.${SUF} tc.bind.${SUF} tc.const.${SUF} tc.defs.${SUF} \ - tc.disc.${SUF} tc.func.${SUF} tc.os.${SUF} tc.printf.${SUF} \ + tc.disc.${SUF} tc.func.${SUF} tc.os.${SUF} tc.os.${SUF} tc.printf.${SUF} \ tc.prompt.${SUF} tc.sched.${SUF} tc.sig.${SUF} tc.str.${SUF} \ tc.vers.${SUF} tc.who.${SUF} @@ -563,7 +563,7 @@ ftp: tcsh-${VERSION}.tar.Z tcsh.tahoe-${VERSION}.tar.Z # config.h: config_f.h -TCH=tc.h tc.const.h tc.decls.h tc.os.h tc.sig.h +TCH=tc.h tc.const.h tc.decls.h tc.nls.h tc.os.h tc.sig.h SHH=sh.h sh.types.h sh.char.h sh.err.h sh.dir.h sh.proc.h pathnames.h \ sh.decls.h ${TCH} TWH=tw.h tw.decls.h @@ -580,7 +580,7 @@ ${OBJS}: config.h ${SHH} # TWH TWINC=ed.chared.${SUF} ed.inputl.${SUF} sh.exec.${SUF} sh.func.${SUF} \ - sh.set.${SUF} tc.func.${SUF} + sh.set.${SUF} tc.func.${SUF} tc.nls.${SUF} ${TWOBJS} ${TWINC}: ${TWH} # glob.h diff --git a/contrib/tcsh/README b/contrib/tcsh/README index 2987991ee907..3852b666517f 100644 --- a/contrib/tcsh/README +++ b/contrib/tcsh/README @@ -1,4 +1,4 @@ -This is tcsh version 6.12. Tcsh is a version of the Berkeley +This is tcsh version 6.14. 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. @@ -86,15 +86,18 @@ To install tcsh: passwd appears on the screen, you have lost /dev/tty. Otherwise everything is fine. -10) Once satisfied that tcsh is working correctly, complete the installation +10) Once satisfied that tcsh is working correctly, complete the installation by typing "make install" to install the binary, and "make install.man" to install the documentation. Don't forget to look at complete.tcsh for useful completions... 11) Enjoy. -12) PLEASE send any bug reports (and fixes), code for new features, - comments, questions, etc. (even flames) to: +12) PLEASE file any bug reports (and fixes), code for new features at: + + http://bugs.gw.com/ + + Comments, questions, etc. (even flames) are welcome via email to: The tcsh bugs mailing list tcsh-bugs@mx.gw.com @@ -107,7 +110,7 @@ On sysv versions < 3.0 (not hpux) Doug Gwyn's public domain directory manipulation library has to be installed. This library is available for anonymous ftp from prep.ai.mit.edu:/pub/gnu/dirent.tar.Z If the network is not installed, then there is a gethostname() -routine is tc.os.c, enabled by defining NEEDgethostname +routine is tc.os.c *************************************************************************** diff --git a/contrib/tcsh/complete.tcsh b/contrib/tcsh/complete.tcsh index d79bcd03379c..35d7a79415e2 100644 --- a/contrib/tcsh/complete.tcsh +++ b/contrib/tcsh/complete.tcsh @@ -1,11 +1,11 @@ # -# $Id: complete.tcsh,v 1.43 2004/02/22 15:57:15 christos Exp $ +# $Id: complete.tcsh,v 1.46 2005/03/21 21:26:08 kim Exp $ # example file using the new completion code # # Debian GNU/Linux # /usr/share/doc/tcsh/examples/complete.gz # -# This file may be read from user's ~/.cshrc or ~/.tcsh file by +# This file may be read from user's ~/.cshrc or ~/.tcshrc file by # decompressing it into the home directory as ~/.complete and # then adding the line "source ~/.complete" and maybe defining # some of the shell variables described below. @@ -49,6 +49,7 @@ if ($?_complete) then 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 @@ -94,11 +95,11 @@ if ($?_complete) then 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 + 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 -)"/ \ @@ -178,20 +179,20 @@ endif 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)"/ \ + 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 endif -endif complete finger c/*@/\$hosts/ n/*/u/@ complete ping p/1/\$hosts/ @@ -246,8 +247,9 @@ 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,\ + 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,\ @@ -257,7 +259,7 @@ if ($?traditional_complete) then sharedstatedir localstatedir libdir \ includedir oldincludedir infodir mandir \ srcdir)//' -else + 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:/' \ @@ -269,7 +271,7 @@ else mandir= srcdir= x-includes= x-libraries= cachefile= \ enable- disable- with- \ help no-create quiet silent version verbose )//' -endif + endif complete gs 'c/-sDEVICE=/(x11 cdjmono cdj550 epson eps9high epsonc \ dfaxhigh dfaxlow laserjet ljet4 sparc pbm \ pbmraw pgm pgmraw ppm ppmraw bit)/' \ @@ -476,8 +478,16 @@ endif 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 bunzip2 'p/*/f:*.bz2/' - complete bzip2 'n/-9/f:^*.bz2/' 'n/-d/f:*.bz2/' + 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 -)"/ \ + n/*/f:*.{bz2,tbz}/ + 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/' @@ -591,14 +601,16 @@ endif 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 \ + 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}/' - else - complete nm 'c/--radix=/x:/' \ + else + complete nm \ + 'c/--radix=/x:/' \ 'c/--target=/x:/' \ 'c/--format=/(bsd sysv posix)/n/' \ 'c/--/(debugsyms extern-only demangle dynamic print-armap \ @@ -607,7 +619,7 @@ endif format= defined-only\ line-numbers no-demangle version \ help)//' \ 'n/*/f:^*.{h,c,cc,s,S}/' - endif + 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)/' @@ -719,10 +731,10 @@ endif endif endif - if ($?traditional_complete) then - # use of $MANPATH from Dan Nicolaescu - # use of 'find' adapted from Lubomir Host - complete man \ + 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.\*\$%%`@'\ @@ -742,8 +754,8 @@ endif '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.\*\$%%`'@ \ + 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.\*\$%%`'@ \ @@ -759,7 +771,7 @@ 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 + 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:''/ @@ -1000,9 +1012,11 @@ n@public@'`[ -r /usr/man/manp ]&& \ls -1 /usr/man/manp | sed s%\\.p.\*\$%%`'@ \ T v V w W X z Z 0 1 2 3 4 5 6 7 -)"/ \ C@/dev@f@ \ n/-c*f/x:''/ \ + n/{-[Adrtux]j*f,--file}/f:*.{tar.bz2,tbz}/ \ n/{-[Adrtux]z*f,--file}/f:*.{tar.gz,tgz}/ \ n/{-[Adrtux]Z*f,--file}/f:*.{tar.Z,taz}/ \ n/{-[Adrtux]*f,--file}/f:*.tar/ \ + N/{-xj*f,--file}/'`tar -tjf $:-1`'/ \ N/{-xz*f,--file}/'`tar -tzf $:-1`'/ \ N/{-xZ*f,--file}/'`tar -tZf $:-1`'/ \ N/{-x*f,--file}/'`tar -tf $:-1`'/ \ @@ -1015,28 +1029,23 @@ n@public@'`[ -r /usr/man/manp ]&& \ls -1 /usr/man/manp | sed s%\\.p.\*\$%%`'@ \ N/{-C,--directory}/'`\ls $:-1`'/ \ n/-[0-7]/"(l m h)"/ - # SVR4 filesystems - complete mount c/-/"(a F m o O p r v V)"/ n/-p/n/ n/-v/n/ \ - n/-o/x:''/ \ - n@-F@'`\ls -1 /usr/lib/fs`'@ \ - n@*@'`grep -v "^#" /etc/vfstab | tr -s " " " " | cut -f 3`'@ - complete umount c/-/"(a o V)"/ n/-o/x:''/ \ - n/*/'`mount | cut -d " " -f 1`'/ - complete mountall c/-/"(F l r)"/ n@-F@'`\ls -1 /usr/lib/fs`'@ - complete umountall c/-/"(F h k l r s)"/ n@-F@'`\ls -1 /usr/lib/fs`'@ \ - n/-h/'`df -k | cut -s -d ":" -f 1 | sort -u`'/ - # BSD 4.3 filesystems - #complete mount c/-/"(a r t v)"/ n/-t/"(4.2 nfs)"/ \ - # n@*@'`grep -v "^#" /etc/fstab | tr -s " " " " | cut -f 2`'@ - #complete umount c/-/"(a h t v)"/ n/-t/"(4.2 nfs)"/ \ - # n/-h/'`df | cut -s -d ":" -f 1 | sort -u`'/ \ - # n/*/'`mount | cut -d " " -f 3`'/ - # BSD 4.2 filesystems - #complete mount c/-/"(a r t v)"/ n/-t/"(ufs nfs)"/ \ - # n@*@'`cut -d ":" -f 2 /etc/fstab`'@ - #complete umount c/-/"(a h t v)"/ n/-t/"(ufs nfs)"/ \ - # n/-h/'`df | cut -s -d ":" -f 1 | sort -u`'/ \ - # n/*/'`mount | cut -d " " -f 3`'/ + # Linux filesystems + complete mount c/-/"(a f F h l n o r s t U v V w)"/ n/-[hV]/n/ \ + n/-o/x:''/ n/-t/x:''/ \ + n/-L/x:'