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

Revision 24011, 4.7 KB checked in by broder, 15 years ago (diff)
In dotfiles: * Stop setting umask in dotfiles. (Trac: #368) Patch by Nancy Ouyang
  • 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  limit coredumpsize 0                  # Don't allow coredumps
45  setenv MORE -s                        # Default "more" behavior
46                                        # we are now down to -s
47                                        # because -d is wrong.
48  setenv EDITOR emacs                   # Set default editor
49  setenv MM_CHARSET iso-8859-1
50
51  setenv EMAIL "$USER@mit.edu"          # Set default email address
52
53  # Set double-sided printing for sufficiently recent users.
54  if ( $ATHENA_DOTFILE_GENERATION >= 1 ) then
55    setenv LPROPT -Zduplex
56  endif
57
58  setenv ATHENA_SYS `/bin/machtype -S`
59  if ( $ATHENA_SYS == "" ) then
60    setenv ATHENA_SYS @sys
61  endif
62  setenv ATHENA_SYS_COMPAT `/bin/machtype -C`
63
64  set bindir=arch/${ATHENA_SYS}/bin
65
66  if ( ! $?PRINTER && -e /var/run/athena-clusterinfo.csh ) then
67    setenv PRINTER `awk '/LPR/ { print $3 }' /var/run/athena-clusterinfo.csh`
68    if ( $PRINTER == "" ) unsetenv PRINTER
69  endif
70
71  # Reset the "home" and HOME variables to correspond to the actual
72  # location of the user's home directory.  This will avoid having
73  # long pathnames being printed when /mit/<user> is a symlink to a
74  # path within AFS.
75
76  set x=`(cd && /bin/pwd)`
77  if ("$x" != "") then
78    set home=$x
79    if ("$x" == "`/bin/pwd`") then
80      set cwd=$x
81    endif
82  endif
83  unset x
84
85  # NOTE:
86  # The use of the "extend", "sextend", and "textend" aliases in
87  # ~/.environment is no longer supported.  Consult the Athena
88  # documentation on Dotfiles for supported dotfile operations
89
90  # Run user environment customizations identified in your
91  # ~/.environment file.  This is the place to include your own
92  # environment variables, attach commands, and other system wide
93  # setup commands.  You can also cancel default behaviors listed
94  # above with "unsetenv" or "setenv".  ~/.environment is not sourced
95  # if NOCALLS is set (i.e., if you selected the xlogin "Ignore your
96  # customizations" option when you logged in).
97
98  if ((! $?NOCALLS) && (-r ~/.environment)) source ~/.environment
99
100  # NOTE:
101  # .path files are no longer supported, consult Athena documentation
102  # for the correct way to specify your PATH
103 
104  # Standard Athena path additions.
105  set path=(`/usr/bin/athdir $HOME` $path .)
106
107endif
108
109# Set appropriate bin directory variable for this platform
110# (e.g., vaxbin for VAXstations, decmipsbin for pMAXen, etc.;  this will
111# be included in actual searchpath as ~/$bindir -- e.g., ~/vaxbin):
112set bindir=arch/${ATHENA_SYS}/bin
113
114# *******************  C SHELL SETUP   *******************
115
116# Set up standard C shell initializations
117
118set noclobber                   # Don't overwrite files with redirection
119
120if ($?prompt) then              # For interactive shells only (i.e., NOT rsh):
121  set interactive               #   Provide shell variable for compatability
122endif
123
124# Set up standard C shell aliases
125
126#   alias for re-establishing authentication
127alias renew 'kinit -54 $USER && fsid -a && zctl load /dev/null'
128
129if ($?XSESSION) then
130  alias logout  'exit && gnome-session-save --kill --silent'    # logout for X
131endif
132
133#   aliases dealing with subjects
134alias setup_X '( setenv SUBJECT \!:1 ; ( xterm -title \!* & ) )'
135alias setup_tty '( setenv SUBJECT \!* ; $SHELL )'
136if ($?XSESSION) then
137  alias setup setup_X
138else
139  alias setup setup_tty
140endif
141alias remove 'setenv SUBJECT \!* ; source $initdir/env_remove ; unsetenv SUBJECT'
142
143# If this is a subject window, run the env_setup script
144if (($?SUBJECT) && (-r $initdir/env_setup)) source $initdir/env_setup
145
146
147# All of the C shell initializing commands above can be overridden by
148# using "unset" or "unalias" commands (or by changing things using
149# "set" or "alias" again) in your ~/.cshrc.mine file, which is sourced
150# here.  ~/.cshrc.mine is not sourced if the xlogin "Ignore your
151# customizations" option was selected to begin the session.
152
153if ((! $?NOCALLS) && (-r ~/.cshrc.mine)) source ~/.cshrc.mine
Note: See TracBrowser for help on using the repository browser.