File: csh.in

package info (click to toggle)
modules 3.2.9c-3
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 3,620 kB
  • sloc: ansic: 10,089; exp: 1,777; sh: 1,433; makefile: 286
file content (53 lines) | stat: -rw-r--r-- 1,498 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
if ($?tcsh) then
	set modules_shell="tcsh"
else
	set modules_shell="csh"
endif
@VERSIONING@if ( $?MODULE_VERSION ) then
@VERSIONING@ 	setenv MODULE_VERSION_STACK 	"$MODULE_VERSION"
@VERSIONING@else
@VERSIONING@ 	setenv MODULE_VERSION		"@VERSION@"
@VERSIONING@ 	setenv MODULE_VERSION_STACK	"@VERSION@"
@VERSIONING@endif
@VERSIONING@set exec_prefix='/usr/share/modules/$MODULE_VERSION'
@NOTVERSIONING@set exec_prefix='/usr/bin'

set prefix=""
set postfix=""

if ( $?histchars ) then
  set histchar = `echo $histchars | cut -c1`
  set _histchars = $histchars

  set prefix  = 'unset histchars;'
  set postfix = 'set histchars = $_histchars;'
else
  set histchar = \!
endif

if ($?prompt) then
  set prefix  = "$prefix"'set _prompt="$prompt";set prompt="";'
  set postfix = "$postfix"'set prompt="$_prompt";unset _prompt;'
endif

if ($?noglob) then
  set prefix  = "$prefix""set noglob;"
  set postfix = "$postfix""unset noglob;"
endif
set postfix = "set _exit="'$status'"; $postfix; test 0 = "'$_exit;'

@VERSIONING@alias module $prefix'eval `/usr/bin/modulecmd '$modules_shell' '$histchar'*`; '$postfix
@NOTVERSIONING@alias module $prefix'eval `/usr/bin/modulecmd '$modules_shell' '$histchar'*`; '$postfix
unset exec_prefix
unset prefix
unset postfix

setenv MODULESHOME /usr/share/modules

if (! $?MODULEPATH ) then
  setenv MODULEPATH `sed -n 's/[ 	#].*$//; /./H; $ { x; s/^\n//; s/\n/:/g; p; }' ${MODULESHOME}/init/.modulespath`
endif

if (! $?LOADEDMODULES ) then
  setenv LOADEDMODULES ""
endif