File: tcsh.in

package info (click to toggle)
lmod 6.6-0.2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 16,716 kB
  • ctags: 1,336
  • sloc: sh: 3,714; python: 967; makefile: 718; tcl: 695; perl: 495; csh: 85; ansic: 35
file content (58 lines) | stat: -rw-r--r-- 1,424 bytes parent folder | download | duplicates (6)
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
54
55
56
57
58
#!/bin/csh
setenv LMOD_CMD    "@PKGV@/libexec/lmod"
setenv LMOD_DIR    "@PKGV@/libexec"
setenv LMOD_PKG    "@PKGV@"
setenv MODULESHOME "@PKGV@"

set prefix  = ""
set midfix  = ""
set postfix = ";"

set histchar = \!
if ( $?histchars) then
  set histchar   = `echo $histchars | cut -c1`
  if ( "$histchar" != '\!' ) then
    set _histchars = $histchars
    set prefix  = 'set _histchars = $histchars; unset histchars;'
    set midfix  = '--localvar histchars=$_histchars'
    set postfix = ';set histchars = $_histchars'
  endif
endif

if ($?tcsh) then
  alias module  $prefix'eval `$LMOD_CMD csh '$midfix $histchar'*` '$postfix' eval `$LMOD_SETTARG_CMD -s csh`'
else
  alias module  $prefix'eval `$LMOD_CMD csh '$midfix $histchar'*` '$postfix
endif
alias clearMT 'eval `'$LMOD_DIR/clearMT_cmd csh'`'

alias ml      'eval `'$LMOD_DIR/ml_cmd' '$histchar'*`'

setenv LMOD_VERSION '@lmod_version@'

unset prefix
unset midfix
unset postfix
unset histchar


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

if ( $?TERM && $?prompt && $?tcsh && "$LMOD_FULL_SETTARG_SUPPORT" != no ) then
   alias cwdcmd 'eval `$LMOD_SETTARG_CMD -s csh`'

   switch ($TERM)
      case "xterm*":
         set echo_style=both
         alias precmd 'echo -n "\033]2;${TARG_TITLE_BAR_PAREN}${HOST}:$cwd\007"'
         breaksw
      endsw
   endif
endif
# Local Variables:
# mode: shell-script
# indent-tabs-mode: nil
# end: