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

Revision 24944, 4.8 KB checked in by jdreed, 13 years ago (diff)
In dotfiles: * Stop setting LPROPT (Trac #794)
  • 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# Set up standard system/user environment configuration (including setup of
29# environment variables, attachment of lockers, and additions to search path)
30
31if (! $?ENV_SET) then
32
33  setenv ENV_SET                                # Avoid unnecessary repeat
34
35  # Ensure user's homedir is attached, for legacy things
36  # that care about attachtab
37  # Only attach if running as an Athena user, not e.g. using sudo.
38  if ( $?DEBATHENA_HOME_TYPE ) then
39    if ( $DEBATHENA_HOME_TYPE == afs ) then
40      if ( $?ATHENA_USER ) then
41        /bin/attach -h -q "$ATHENA_USER"
42      else
43        /bin/attach -h -q "$USER"
44      endif
45    endif
46  endif
47
48  if (-r ~/.generation) then
49    setenv ATHENA_DOTFILE_GENERATION `cat ~/.generation`
50  else
51    setenv ATHENA_DOTFILE_GENERATION 0
52  endif
53
54  limit coredumpsize 0                  # Don't allow coredumps
55  setenv MORE -s                        # Default "more" behavior
56                                        # we are now down to -s
57                                        # because -d is wrong.
58  setenv EDITOR emacs                   # Set default editor
59  setenv MM_CHARSET iso-8859-1
60
61  setenv EMAIL "$USER@mit.edu"          # Set default email address
62
63  setenv ATHENA_SYS `/bin/machtype -S`
64  if ( $ATHENA_SYS == "" ) then
65    setenv ATHENA_SYS @sys
66  endif
67  setenv ATHENA_SYS_COMPAT `/bin/machtype -C`
68
69  set bindir=arch/${ATHENA_SYS}/bin
70
71  if ( ! $?PRINTER && -e /var/run/athena-clusterinfo.csh ) then
72    setenv PRINTER `awk '/LPR/ { print $3 }' /var/run/athena-clusterinfo.csh`
73    if ( $PRINTER == "" ) unsetenv PRINTER
74  endif
75
76  # Reset the "home" and HOME variables to correspond to the actual
77  # location of the user's home directory.  This will avoid having
78  # long pathnames being printed when /mit/<user> is a symlink to a
79  # path within AFS.
80
81  set x=`(cd && /bin/pwd)`
82  if ("$x" != "") then
83    set home=$x
84    if ("$x" == "`/bin/pwd`") then
85      set cwd=$x
86    endif
87  endif
88  unset x
89
90  # NOTE:
91  # The use of the "extend", "sextend", and "textend" aliases in
92  # ~/.environment is no longer supported.  Consult the Athena
93  # documentation on Dotfiles for supported dotfile operations
94
95  # Run user environment customizations identified in your
96  # ~/.environment file.  This is the place to include your own
97  # environment variables, attach commands, and other system wide
98  # setup commands.  You can also cancel default behaviors listed
99  # above with "unsetenv" or "setenv".  ~/.environment is not sourced
100  # if NOCALLS is set (i.e., if you selected the xlogin "Ignore your
101  # customizations" option when you logged in).
102
103  if ((! $?NOCALLS) && (-r ~/.environment)) source ~/.environment
104
105  # NOTE:
106  # .path files are no longer supported, consult Athena documentation
107  # for the correct way to specify your PATH
108 
109  # Standard Athena path additions.
110  set path=(`/usr/bin/athdir $HOME` $path .)
111
112endif
113
114# Set appropriate bin directory variable for this platform
115# (e.g., vaxbin for VAXstations, decmipsbin for pMAXen, etc.;  this will
116# be included in actual searchpath as ~/$bindir -- e.g., ~/vaxbin):
117set bindir=arch/${ATHENA_SYS}/bin
118
119# *******************  C SHELL SETUP   *******************
120
121# Set up standard C shell initializations
122
123set noclobber                   # Don't overwrite files with redirection
124
125if ($?prompt) then              # For interactive shells only (i.e., NOT rsh):
126  set interactive               #   Provide shell variable for compatability
127endif
128
129# Set up standard C shell aliases
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.