Commit e6f49ca5 authored by Lucas Nussbaum's avatar Lucas Nussbaum

Imported Upstream version 6.16.00

parent 2a2515e4
33. V6.16.00 - 20080930
32. longjmp clobbered variable fixes.
31. __GNX__ addition
30. Windows fork fixes
28. V6.15.02 - 20080830
27. Fix an eval free'ing botch (Per Hedeland)
26. /bin/echo "`" coredumped because stderror() calls longjmp corrupting
the stack (Mark Davies). We should vet the code for all stderror()
calls that cleanup local stack variables.
25. foo > ${undef} caused coredumps because of vfork() child corrupting
the state of the parent stack.
24. $x[A-B] did not complain for A out of range. (Cai Xianchao)
23. rename setp -> tcsh_setp to avoid conflict with mach (Javier Vasquez)
22. Fix degree handling by defining __XPG4_CHAR_CLASS__ for solaris
(Mike Sullivan)
21. Change 'od' to 'od -c' in tests so that they work on big endian machines.
(Martin Kraemer)
20. Add environment variable COMMAND_LINE to be available in completions
(Marcin Konarski)
19. V6.15.01 - 20070928
18. Evaluate expressions in the proper order (Li Zefan), controlled by
compat_expr.
17. Don't need to flush() if we are silent. Prevents recursive error issue.
(joshua stein)
16. Don't execute the jobcmd if the output is not a tty (Charles Ross)
15. Quote the history in the examples (Johann 'Myrkraverk' Oskarsson)
14. Mismatch clarification patch (Per Hedeland)
13. Fix 'repeat n cmd &' abort() (Mike Sullivan)
12. Fix octal parsing (Li Zefan)
11. Fix pty detection for autologout setting (Kris Kennaway, Giorgos Keramidas)
10. kill `foo` got stuck because sigchld was disabled too soon (Mark Peek)
9. Avoid null pointer dereference in proc cwd (Kurt Miller)
8. eval "foreach a b c" exits (Anthony Menasse)
7. Quoting was broken in substitutions (Joe Wells)
6. QNX patches via pkgsrc
5. cd - twice from a directory that contained a glob pattern,
expands the glob twice (Mark Santcroos)
4. MidnightBsd support (Lucas Holt)
3. Fix history substitution core-dump with no history entries
2. Merge two character tables that are the same (Martin Kraemer)
1. On ancient 7 bit locales, punctuation characters are used to
denote special characters such as umlaut, adiaresis, etc.
These characters return true for isalpha/isalnum. Ignore them
because they break parsing (Martin Kraemer)
74. V6.15.00 - 20070303
73. fix extension eating windows code (christos)
72. fix loop in %R history expansion (christos)
......
XCOMM
XCOMM $tcsh: Imakefile,v 1.85 2006/03/02 18:46:44 christos Exp $
XCOMM $tcsh: Imakefile,v 1.86 2007/03/19 23:25:02 christos Exp $
XCOMM
XCOMM Imakefile for tcsh 6.12
XCOMM Marc Horowitz, MIT SIPB
......@@ -211,6 +211,10 @@ EXTF=mi.termios.c mi.wait.h mi.varargs.h vms.termcap.c
# define ConfigH bsd4.4
# endif /* FreeBsdArchitecture */
# ifdef MidnightBSDArchitecture
# define ConfigH bsd4.4
# endif /* MidnightBsdArchitecture */
# ifdef i386SVR4Architecture
# define ConfigH sysv4
# ifdef DELL
......
# $tcsh: Makefile.in,v 3.36 2006/08/24 20:56:31 christos Exp $
# $tcsh: Makefile.in,v 3.38 2008/09/25 14:40:35 christos Exp $
# Makefile.in 4.3 6/11/83
#
# C Shell with process control; VM/UNIX VAX Makefile
......@@ -248,7 +248,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 -Wmissing-declarations -Wredundant-decls -Wnested-externs -Wsign-compare -Wcast-qual -Wreturn-type -Wswitch -Wshadow -Wwrite-strings
#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
#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
......@@ -531,11 +531,16 @@ install.cygwin: install install.man
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
cp -p ${srcdir}/cygwin/etc/csh.* ${DESTDIR}/etc
cp -p ${srcdir}/cygwin/etc/profile.d/*.tcsh ${DESTDIR}/etc/profile.d
cp -p ${srcdir}/cygwin/etc/postinstall/tcsh.sh ${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
# Amiga Unix
#install.man: tcsh.man
......
This is tcsh version 6.15. Tcsh is a version of the Berkeley
This is tcsh version 6.16.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.
......
#
# $tcsh: complete.tcsh,v 1.47 2006/03/02 18:46:44 christos Exp $
# $tcsh: complete.tcsh,v 1.51 2007/10/01 21:51:59 christos Exp $
# example file using the new completion code
#
# Debian GNU/Linux
......@@ -38,18 +38,18 @@ 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`)
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
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
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
......@@ -224,7 +224,7 @@ if ($?_complete) then
# 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/@
"c@+@F:$HOME/Mail/@"
# these and interrupt handling from Jaap Vermeulen <jaap@sequent.com>
complete {rexec,rxexec,rxterm,rmterm} \
......@@ -286,7 +286,7 @@ if ($?_complete) then
complete setenv 'p/1/e/' 'c/*:/f/'
# these and method of setting hosts from Kimmo Suominen <kim@tac.nyc.ny.us>
if ( -f $HOME/.mh_profile && -x "`which folders`" ) then
if ( -f "$HOME/.mh_profile" && -x "`which folders`" ) then
if ( ! $?FOLDERS ) setenv FOLDERS "`folders -fast -recurse`"
if ( ! $?MHA ) setenv MHA "`ali | sed -e '/^ /d' -e 's/:.*//'`"
......@@ -505,6 +505,19 @@ if ($?_complete) then
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/'
......@@ -591,14 +604,14 @@ if ($?_complete) then
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/@ \
complete mutt "c@-f=@F:${HOME}/Mail/@" \
n/-a/f/ \
n/-F/f/ n/-H/f/ \
n/-s/x:'<subject line>'/ \
n/-e/x:'<command>'/ \
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 }'"'"\`@
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
......@@ -711,14 +724,15 @@ if ($?_complete) then
complete unsetenv n/*/e/
set _maildir = /var/mail
if (-r $HOME/.mailrc) then
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:'<subject>'/ \
"c@+@F:$HOME/Mail@" C@[./\$~]@f@ n/-s/x:'<subject>'/ \
n@-u@T:$_maildir@ n/-f/f/ \
n@*@'`sed -n s/alias//p $HOME/.mailrc | tr -s " " " " | cut -f 2`'@
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:'<subject>'/ \
"c@+@F:$HOME/Mail@" C@[./\$~]@f@ n/-s/x:'<subject>'/ \
n@-u@T:$_maildir@ n/-f/f/ n/*/u/
endif
unset _maildir
......@@ -1029,23 +1043,41 @@ 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)"/
# 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:'<options>'/ n/-t/x:'<vfstype>'/ \
n/-L/x:'<label>'/ n/-U/x:'<uuid>'/ \
n@*@'`grep -v "^#" /etc/fstab | tr -s " " " " | cut -f 2`'@
complete umount c/-/"(a h n r t v V)"/ n/-t/x:'<vfstype>'/ \
n/*/'`mount | cut -d " " -f 3`'/
# Solaris filesystems
#complete mount c/-/"(a F m o O p r v V)"/ n/-p/n/ n/-v/n/ \
# n/-o/x:'<FSType_options>'/ \
# 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:'<FSType_options>'/ \
# 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`'/
switch ( "$OSTYPE" )
case "linux":
# 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:'<options>'/ n/-t/x:'<vfstype>'/ \
n/-L/x:'<label>'/ n/-U/x:'<uuid>'/ \
n@*@'`grep -v "^#" /etc/fstab | tr -s " " " " | cut -f 2`'@
complete umount c/-/"(a h n r t v V)"/ n/-t/x:'<vfstype>'/ \
n/*/'`mount | cut -d " " -f 3`'/
breaksw
case "sunos*":
case "solaris":
# Solaris filesystems
complete mount c/-/"(a F m o O p r v V)"/ n/-p/n/ n/-v/n/ \
n/-o/x:'<FSType_options>'/ \
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:'<FSType_options>'/ \
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`'/
breaksw
case "cygwin":
# Cygwin mounts
complete mount c/-/"(b c f h m o p s t u v x E X)"/ n/-[hmpv]/n/ \
n/-c/x:'/'/ \
n/-o/"(user system binary text exec notexec cygexec nosuid managed)"/ \
n@*@'`mount -p | tail -1 | cut -d " " -f 1 | xargs ls -1 | awk '"'"'{print $1":/"; } END{print "//";}'"'"'`'@
complete umount c/-/"(A c h s S u U v)"/ n/-[AhSUv]/n/ \
n@*@'`mount | grep -v noumount | cut -d " " -f 3`'@
breaksw
default:
breaksw
endsw
# these deal with NIS (formerly YP); if it's not running you don't need 'em
if (-X domainname) then
......
This diff is collapsed.
......@@ -195,7 +195,7 @@
/* Define to 1 if the `setpgrp' function takes no argument. */
#undef SETPGRP_VOID
/* The size of a `wchar_t', as computed by sizeof. */
/* The size of `wchar_t', as computed by sizeof. */
#undef SIZEOF_WCHAR_T
/* Define to 1 if the `S_IS*' macros in <sys/stat.h> do not work properly. */
......@@ -213,7 +213,7 @@
/* Define to `int' if <sys/types.h> does not define. */
#undef mode_t
/* Define to `unsigned' if <sys/types.h> does not define. */
/* Define to `unsigned int' if <sys/types.h> does not define. */
#undef size_t
/* Define to `int' if neither <sys/types.h> nor <sys/socket.h> define. */
......
This diff is collapsed.
This diff is collapsed.
/*
* config.h -- configure various defines for tcsh
*
* All source files should #include this FIRST.
*
* Edit this to match your system type.
*/
#ifndef _h_config
#define _h_config
/****************** System dependant compilation flags ****************/
/*
* POSIX This system supports IEEE Std 1003.1-1988 (POSIX).
*/
#define POSIX
/*
* POSIXJOBS This system supports the optional IEEE Std 1003.1-1988 (POSIX)
* job control facilities.
*/
#define POSIXJOBS
/*
* POSIXSIGS Use the POSIX signal facilities to emulate BSD signals.
*/
#define POSIXSIGS
/*
* VFORK This machine has a vfork().
* It used to be that for job control to work, this define
* was mandatory. This is not the case any more.
* If you think you still need it, but you don't have vfork,
* define this anyway and then do #define vfork fork.
* I do this anyway on a Sun because of yellow pages brain damage,
* [should not be needed under 4.1]
* and on the iris4d cause SGI's fork is sufficiently "virtual"
* that vfork isn't necessary. (Besides, SGI's vfork is weird).
* Note that some machines eg. rs6000 have a vfork, but not
* with the berkeley semantics, so we cannot use it there either.
*/
#define VFORK
/*
* BSDJOBS You have BSD-style job control (both process groups and
* a tty that deals correctly
*/
#undef BSDJOBS
/*
* BSDSIGS You have 4.2-style signals, rather than USG style.
* Note: POSIX systems should not define this unless they
* have sigvec() and friends (ie: 4.3BSD-RENO, HP-UX).
*/
#undef BSDSIGS
/*
* BSDTIMES You have BSD-style process time stuff (like rusage)
* This may or may not be true. For example, Apple Unix
* (OREO) has BSDJOBS and BSDSIGS but not BSDTIMES.
*/
#undef BSDTIMES
/*
* BSDLIMIT You have BSD-style resource limit stuff (getrlimit/setrlimit)
*/
#define BSDLIMIT
/*
* TERMIO You have struct termio instead of struct sgttyb.
* This is usually the case for SYSV systems, where
* BSD uses sgttyb. POSIX systems should define this
* anyway, even though they use struct termios.
*/
#define TERMIO
/*
* SYSVREL Your machine is SYSV based (HPUX, A/UX)
* NOTE: don't do this if you are on a Pyramid -- tcsh is
* built in a BSD universe.
* Set SYSVREL to 1, 2, 3, or 4, depending the version of System V
* you are running. Or set it to 0 if you are not SYSV based
*/
#define SYSVREL 0
/*
* YPBUGS Work around Sun YP bugs that cause expansion of ~username
* to send command output to /dev/null
*/
#undef YPBUGS
/****************** local defines *********************/
#undef NLS
#undef NLS_CATALOGS
#endif /* _h_config */
......@@ -88,6 +88,16 @@
/****************** local defines *********************/
#define SOLARIS2 21
/*
* Fix http://bugs.opensolaris.org/view_bug.do?bug_id=6593766
* All XPG4 and XPG4.2 applications should use __XPG4_CHAR_CLASS__
* The degree character(?) is not part of ASCII. It is part of extended-ASCII
* and needs wide char to get this to working. Hence we need to enable the
* macro __XPG4_CHAR_CLASS__ in config_f.h header file under tcsh to get
* this to working.
*/
#define __XPG4_CHAR_CLASS__
/*
* lookupname/namei ignores tailing '/' on files
*/
......
......@@ -88,6 +88,16 @@
/****************** local defines *********************/
#define SOLARIS2 22
/*
* Fix http://bugs.opensolaris.org/view_bug.do?bug_id=6593766
* All XPG4 and XPG4.2 applications should use __XPG4_CHAR_CLASS__
* The degree character(?) is not part of ASCII. It is part of extended-ASCII
* and needs wide char to get this to working. Hence we need to enable the
* macro __XPG4_CHAR_CLASS__ in config_f.h header file under tcsh to get
* this to working.
*/
#define __XPG4_CHAR_CLASS__
/*
* lookupname/namei ignores tailing '/' on files
*/
......
......@@ -94,6 +94,16 @@
/****************** local defines *********************/
#define SOLARIS2 23
/*
* Fix http://bugs.opensolaris.org/view_bug.do?bug_id=6593766
* All XPG4 and XPG4.2 applications should use __XPG4_CHAR_CLASS__
* The degree character(?) is not part of ASCII. It is part of extended-ASCII
* and needs wide char to get this to working. Hence we need to enable the
* macro __XPG4_CHAR_CLASS__ in config_f.h header file under tcsh to get
* this to working.
*/
#define __XPG4_CHAR_CLASS__
/*
* lookupname/namei ignores tailing '/' on files
*/
......
......@@ -94,6 +94,16 @@
/****************** local defines *********************/
#define SOLARIS2 24
/*
* Fix http://bugs.opensolaris.org/view_bug.do?bug_id=6593766
* All XPG4 and XPG4.2 applications should use __XPG4_CHAR_CLASS__
* The degree character(?) is not part of ASCII. It is part of extended-ASCII
* and needs wide char to get this to working. Hence we need to enable the
* macro __XPG4_CHAR_CLASS__ in config_f.h header file under tcsh to get
* this to working.
*/
#define __XPG4_CHAR_CLASS__
/*
* lookupname/namei ignores tailing '/' on files
*/
......
......@@ -94,12 +94,15 @@
/****************** local defines *********************/
#define SOLARIS2 26
/*
* LARGE_OFFSETS (Solaris 2.6 in conjunction with NFSv3 to servers with >31 bit
* file offsets (e.g. Irix 6.2)
/*
* Fix http://bugs.opensolaris.org/view_bug.do?bug_id=6593766
* All XPG4 and XPG4.2 applications should use __XPG4_CHAR_CLASS__
* The degree character(?) is not part of ASCII. It is part of extended-ASCII
* and needs wide char to get this to working. Hence we need to enable the
* macro __XPG4_CHAR_CLASS__ in config_f.h header file under tcsh to get
* this to working.
*/
#define _FILE_OFFSET_BITS 64
#define _LARGE_FILE64_SOURCE
#define __XPG4_CHAR_CLASS__
/*
* lookupname/namei ignores tailing '/' on files
......
This diff is collapsed.
......@@ -9,7 +9,7 @@ dnl Written by Kaveh Ghazi (ghazi@caip.rutgers.edu) 5/11/96.
dnl
AC_PREREQ([2.59])dnl Minimum Autoconf version required.
AC_INIT([tcsh], [6.15.00], [http://bugs.gw.com/])
AC_INIT([tcsh], [6.16.00], [http://bugs.gw.com/])
AC_CONFIG_SRCDIR([tc.vers.c])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_TESTDIR([.], [.])
......@@ -101,6 +101,11 @@ case "${host}" in
tcsh_config_file=bsd4.4
;;
## MidnightBSD systems
*-*-midnightbsd*)
tcsh_config_file=bsd4.4
;;
## OpenBSD systems
*-*-openbsd*)
tcsh_config_file=bsd4.4
......@@ -233,6 +238,11 @@ case "${host}" in
tcsh_config_file=apollo
;;
## QNX6
*-qnx6*)
tcsh_config_file=qnx6
;;
* )
changequote([, ])dnl
AC_MSG_ERROR([Tcsh can't guess the configuration file name
......
# Example bindkey.tcsh which binds some of the common xterm/linux/cygwin
# terminal keys.
bindkey -e # Force EMACS key binding
bindkey "^[[2~" yank # Insert key
bindkey "^[[3~" delete-char # Delete key
bindkey "^[[H" beginning-of-line # Home key
bindkey "^[[F" end-of-line # End key
bindkey "^[[5~" up-history # Page up key
bindkey "^[[6~" down-history # Page down key
bindkey "^[[C" forward-char # Cursor right
bindkey "^[[D" backward-char # Cursor left
bindkey "^[[A" up-history # Cursor up
bindkey "^[[B" down-history # Cursor down
bindkey "^[^[[D" backward-word # Alt Cursor left
bindkey "^[^[[C" forward-word # Alt Cursor right
bindkey "^?" backward-delete-char # However the BS key is defined...
bindkey "^H" backward-delete-char # However the BS key is defined...
#
# Example /etc/csh.cshrc for Cygwin
#
onintr -
if ( -d /etc/profile.d ) then
set nonomatch
foreach _s ( /etc/profile.d/*.csh )
if ( -r $_s ) then
source $_s
endif
end
unset _s nonomatch
endif
if (! ${?prompt}) goto end
# This is an interactive session
# Now read in the key bindings of the tcsh
if ($?tcsh && -r /etc/profile.d/bindkey.tcsh) then
source /etc/profile.d/bindkey.tcsh
endif
# On Cygwin it's possible to start tcsh without having any Cygwin /bin
# path in $PATH. This breaks complete.tcsh starting with tcsh 6.15.00.
# For that reason we add /bin to $PATH temporarily here. We remove it
# afterwards because it's added again (and correctly so) in /etc/csh.login.
set path=( /bin $path:q )
# Source the completion extension for tcsh
if ($?tcsh && -r /etc/profile.d/complete.tcsh) then
source /etc/profile.d/complete.tcsh
endif
# Reset $PATH.
set path=( $path[2-]:q )
# If we find $HOME/.{t}cshrc we skip our settings used for interactive sessions.
if (-r "$HOME/.cshrc" || -r "$HOME/.tcshrc") goto end
# Set prompt
if ($?tcsh) then
set prompt='[%n@%m %c02]$ '
else
set prompt=\[`id -un`@`hostname`\]\$\
endif
# Some neat default settings.
set autocorrect=1
set autolist=ambiguous
unset autologout
set complete=enhance
set correct=cmd
set echo_style=both
set ellipsis
set fignore=(.o \~)
set histdup=erase
set history=100
unset ignoreeof
set listjobs=long
set listmaxrows=23
#set noglob
set notify=1
set rmstar=1
set savehist=( $history merge )
set showdots=1
set symlinks=expand
# Some neat aliases
alias ++ pushd
alias -- popd
alias d dirs
alias h history
alias j jobs
alias l 'ls -C'
alias la 'ls -a'
alias ll 'ls -l'
alias ls 'ls --color'
end:
onintr
#
# Example /etc/csh.login for Cygwin
#
unsetenv TEMP
unsetenv TMP
set path=( /usr/local/bin /usr/bin /bin $path:q )
if ( ! ${?USER} ) then
set user="`id -un`"
endif
if ( ! ${?HOME} ) then
set home=/home/$USER
endif
if ( ! -d "$HOME" ) then
mkdir -p "$HOME"
endif
if ( ! ${?term} || "$term" == "unknown" || "$tty" == "conin" ) then
set term=cygwin
endif
setenv MAKE_MODE unix
setenv SHELL /bin/tcsh
umask 022
cd
#!/bin/bash
rm -f /usr/bin/csh /usr/bin/csh.exe /usr/bin/csh.lnk /usr/share/man/man1/csh.1*
cd /bin
ln -s tcsh csh
cd /usr/share/man/man1
ln -s tcsh.1 csh.1
[ -e /etc/csh.cshrc ] || cp /etc/defaults/etc/csh.cshrc /etc
[ -e /etc/csh.login ] || cp /etc/defaults/etc/csh.login /etc
[ -e /etc/profile.d/bindkey.tcsh ] || \
cp /etc/defaults/etc/profile.d/bindkey.tcsh /etc/profile.d
[ -e /etc/profile.d/complete.tcsh ] || \
cp /etc/defaults/etc/profile.d/complete.tcsh /etc/profile.d
#!/bin/bash
rm -f /usr/bin/csh /usr/bin/csh.exe /usr/bin/csh.lnk /usr/share/man/man1/csh.1*
/* $Header: /p/tcsh/cvsroot/tcsh/ed.h,v 3.49 2006/08/23 15:03:13 christos Exp $ */
/* $Header: /p/tcsh/cvsroot/tcsh/ed.h,v 3.50 2007/07/05 14:13:06 christos Exp $ */
/*
* ed.h: Editor declarations and globals
*/
......@@ -43,6 +43,11 @@
# define NT_NUM_KEYS 256
#endif /* WINNT_NATIVE */
#ifdef __QNXNTO__
#undef min
#undef max
#endif
/****************************************************************************/
/* stuff for the different states returned by the character editor routines */
/****************************************************************************/
......
/* $Header: /p/tcsh/cvsroot/tcsh/ed.inputl.c,v 3.66 2006/11/29 22:32:24 christos Exp $ */
/* $Header: /p/tcsh/cvsroot/tcsh/ed.inputl.c,v 3.67 2007/09/28 21:02:02 christos Exp $ */
/*
* ed.inputl.c: Input line handling.
*/
......@@ -32,7 +32,7 @@
*/
#include "sh.h"
RCSID("$tcsh: ed.inputl.c,v 3.66 2006/11/29 22:32:24 christos Exp $")
RCSID("$tcsh: ed.inputl.c,v 3.67 2007/09/28 21:02:02 christos Exp $")
#include "ed.h"
#include "ed.defns.h" /* for the function names */
......@@ -45,8 +45,10 @@ RCSID("$tcsh: ed.inputl.c,v 3.66 2006/11/29 22:32:24 christos Exp $")
extern int MapsAreInited;
/* mismatched first character */
static Char mismatch[] =
{'!', '^' , '\\', '-', '%', '\0', '"', '\'', '`', '\0' };
static Char mismatch[] = { '\\', '-', '%', '\0' };
/* don't Strchr() for '\0', obey current history character settings */
#define MISMATCH(c) ((c) == '\0' || (c) == HIST || (c) == HISTSUB || \
Strchr(mismatch, (c)))
static int Repair (void);
static int GetNextCommand (KEYCMD *, Char *);
......@@ -845,10 +847,7 @@ SpellLine(int cmdonly)
Cursor--;
endflag = 0;
}
/* Obey current history character settings */
mismatch[0] = HIST;
mismatch[1] = HISTSUB;
if (!Strchr(mismatch, *argptr) &&
if (!MISMATCH(*argptr) &&
(!cmdonly || starting_a_command(argptr, InputBuf))) {
#ifdef WINNT_NATIVE
/*
......@@ -926,7 +925,7 @@ CompleteLine(void)
Cursor--;
endflag = 0;
}
if (!Strchr(mismatch, *argptr) && starting_a_command(argptr, InputBuf)) {
if (!MISMATCH(*argptr) && starting_a_command(argptr, InputBuf)) {
tmatch = tenematch(InputBuf, Cursor - InputBuf, RECOGNIZE);
if (tmatch <= 0) {
return 0;
......
/* $Header: /p/tcsh/cvsroot/tcsh/ed.term.h,v 1.17 2004/12/25 21:15:06 christos Exp $ */
/* $Header: /p/tcsh/cvsroot/tcsh/ed.term.h,v 1.18 2007/07/05 14:13:06 christos Exp $ */
/*
* ed.term.h: Local terminal header
*/
......@@ -453,7 +453,7 @@
* Also for RH6.2 on the alpha, defined TIOCGLTC, but does not have
* struct ltchars
*/
#if (defined(hpux) && defined(VSUSP) && defined(VDSUSP) && defined(VWERASE) && defined(VLNEXT)) || defined(__linux__) || defined(__GNU__) || defined(__GLIBC__)
#if (defined(hpux) && defined(VSUSP) && defined(VDSUSP) && defined(VWERASE) && defined(VLNEXT)) || defined(__linux__) || defined(__GNU__) || defined(__GLIBC__) || defined(__QNXNTO__)
# undef TIOCGLTC /* not really needed */
# undef TIOCSLTC
#endif
......
newcode :
/* $Header: /p/tcsh/cvsroot/tcsh/host.defs,v 1.43 2006/03/02 18:46:44 christos Exp $ */
/* $Header: /p/tcsh/cvsroot/tcsh/host.defs,v 1.46 2008/09/25 14:41:05 christos Exp $ */
/*
* host.defs: Hosttype/Machtype etc.
*/
......@@ -33,7 +33,7 @@ newcode :
*/
#include "sh.h"
RCSID("$tcsh: host.defs,v 1.43 2006/03/02 18:46:44 christos Exp $")
RCSID("$tcsh: host.defs,v 1.46 2008/09/25 14:41:05 christos Exp $")
endcode :
......@@ -520,6 +520,15 @@ machtype: defined(M_i386) : "i386"
enddef :
newdef : defined(__MidnightBSD__)