source: trunk/debathena/debathena/dotfiles/cshrc @ 23842

Revision 23842, 4.8 KB checked in by broder, 15 years ago (diff)
In dotfiles: * Desupport extend, sextend, textend, ~/.path, cdpath, and setting the prompt in tcsh. (Trac: #256)
  • Property svn:executable set to *
Line 
1# Global cshrc file
2#
3# $Id: cshrc,v 1.12 2007-08-22 18:12:33 ghudson Exp $
4
5# This file is sourced by default user file ~/.cshrc
6
7
8set initdir=/usr/lib/init
9
10# *******************   ENVIRONMENT SETUP   *******************
11
12# Compatibility with older versions of Athena tcsh
13set autolist=""
14if ($?tcsh) then
15  bindkey "^W" backward-delete-word
16  bindkey "^Z" complete-word
17  bindkey " " magic-space
18
19endif
20
21# Set host type and hostname variables.
22if (! $?ATHENA_HOSTTYPE) setenv ATHENA_HOSTTYPE "`/bin/machtype`"
23if (! $?HOST) setenv HOST "`hostname`"
24setenv HOSTTYPE "$ATHENA_HOSTTYPE"
25set hosttype=$HOSTTYPE
26set host=$HOST
27
28# add alias for attaching lockers
29alias add 'eval `/bin/attach -Padd \!:*`'
30
31# Set up standard system/user environment configuration (including setup of
32# environment variables, attachment of lockers, and additions to search path)
33
34if (! $?ENV_SET) then
35
36  setenv ENV_SET                                # Avoid unnecessary repeat
37
38  if (-r ~/.generation) then
39    setenv ATHENA_DOTFILE_GENERATION `cat ~/.generation`
40  else
41    setenv ATHENA_DOTFILE_GENERATION 0
42  endif
43
44  umask 077                             # Strictly protect files
45                                        #  (does not apply in AFS)
46  limit coredumpsize 0                  # Don't allow coredumps
47  setenv MORE -s                        # Default "more" behavior
48                                        # we are now down to -s
49                                        # because -d is wrong.
50  setenv EDITOR emacs                   # Set default editor
51  setenv MM_CHARSET iso-8859-1
52
53  setenv EMAIL "$USER@mit.edu"          # Set default email address
54
55  # Set double-sided printing for sufficiently recent users.
56  if ( $ATHENA_DOTFILE_GENERATION >= 1 ) then
57    setenv LPROPT -Zduplex
58  endif
59
60  setenv ATHENA_SYS `/bin/machtype -S`
61  if ( $ATHENA_SYS == "" ) then
62    setenv ATHENA_SYS @sys
63  endif
64  setenv ATHENA_SYS_COMPAT `/bin/machtype -C`
65
66  set bindir=arch/${ATHENA_SYS}/bin
67
68  if ( ! $?PRINTER && -e /var/run/athena-clusterinfo.csh ) then
69    setenv PRINTER `awk '/LPR/ { print $3 }' /var/run/athena-clusterinfo.csh`
70    if ( $PRINTER == "" ) unsetenv PRINTER
71  endif
72
73  # Reset the "home" and HOME variables to correspond to the actual
74  # location of the user's home directory.  This will avoid having
75  # long pathnames being printed when /mit/<user> is a symlink to a
76  # path within AFS.
77
78  set x=`(cd && /bin/pwd)`
79  if ("$x" != "") then
80    set home=$x
81    if ("$x" == "`/bin/pwd`") then
82      set cwd=$x
83    endif
84  endif
85  unset x
86
87  # NOTE:
88  # The use of the "extend", "sextend", and "textend" aliases in
89  # ~/.environment is no longer supported.  Consult the Athena
90  # documentation on Dotfiles for supported dotfile operations
91
92  # Run user environment customizations identified in your
93  # ~/.environment file.  This is the place to include your own
94  # environment variables, attach commands, and other system wide
95  # setup commands.  You can also cancel default behaviors listed
96  # above with "unsetenv" or "setenv".  ~/.environment is not sourced
97  # if NOCALLS is set (i.e., if you selected the xlogin "Ignore your
98  # customizations" option when you logged in).
99
100  if ((! $?NOCALLS) && (-r ~/.environment)) source ~/.environment
101
102  # NOTE:
103  # .path files are no longer supported, consult Athena documentation
104  # for the correct way to specify your PATH
105 
106  # Standard Athena path additions.
107  set path=(`/usr/bin/athdir $HOME` $path .)
108
109endif
110
111# Set appropriate bin directory variable for this platform
112# (e.g., vaxbin for VAXstations, decmipsbin for pMAXen, etc.;  this will
113# be included in actual searchpath as ~/$bindir -- e.g., ~/vaxbin):
114set bindir=arch/${ATHENA_SYS}/bin
115
116# *******************  C SHELL SETUP   *******************
117
118# Set up standard C shell initializations
119
120set noclobber                   # Don't overwrite files with redirection
121
122if ($?prompt) then              # For interactive shells only (i.e., NOT rsh):
123  set interactive               #   Provide shell variable for compatability
124endif
125
126# Set up standard C shell aliases
127
128#   alias for re-establishing authentication
129alias renew 'kinit -54 $USER && fsid -a && zctl load /dev/null'
130
131if ($?XSESSION) then
132  alias logout  'exit && gnome-session-save --kill --silent'    # logout for X
133endif
134
135#   aliases dealing with subjects
136alias setup_X '( setenv SUBJECT \!:1 ; ( xterm -title \!* & ) )'
137alias setup_tty '( setenv SUBJECT \!* ; $SHELL )'
138if ($?XSESSION) then
139  alias setup setup_X
140else
141  alias setup setup_tty
142endif
143alias remove 'setenv SUBJECT \!* ; source $initdir/env_remove ; unsetenv SUBJECT'
144
145# If this is a subject window, run the env_setup script
146if (($?SUBJECT) && (-r $initdir/env_setup)) source $initdir/env_setup
147
148
149# All of the C shell initializing commands above can be overridden by
150# using "unset" or "unalias" commands (or by changing things using
151# "set" or "alias" again) in your ~/.cshrc.mine file, which is sourced
152# here.  ~/.cshrc.mine is not sourced if the xlogin "Ignore your
153# customizations" option was selected to begin the session.
154
155if ((! $?NOCALLS) && (-r ~/.cshrc.mine)) source ~/.cshrc.mine
Note: See TracBrowser for help on using the repository browser.