Debian Codegraph @

testsuite/modulefiles/alias/3.0

raw
1 #%Module1.0
2
3 ##############################################################################
4 # Modules Revision 3.0
5 # Providing a flexible user environment
6 #
7 # File: alias/%M%
8 # Revision: %I%
9 # First Edition: 2018/05/19
10 # Last Mod.: %U%, %G%
11 #
12 # Authors: Xavier Delaruelle <[email protected]>
13 #
14 # Description: Testuite modulefile
15 # Command:
16 # Sub-Command: set-alias
17 #
18 # Comment: %C{
19 # Check how special characters in alias definition are handled
20 # }C%
21 #
22 ##############################################################################
23
24 switch -- [module-info shelltype] {
25 {sh} {
26 set-alias testsuite {echo $(grep "report .Modules " modulecmd.tcl | tr -d \\ | awk '{print \$3}')}
27 }
28 {csh} {
29 set-alias testsuite {echo `grep "report .Modules " modulecmd.tcl | tr -d \\ | awk '{print \$3}'`}
30 }
31 {fish} {
32 set-alias testsuite {echo (grep "report .Modules " modulecmd.tcl | tr -d \\ | awk '{print \$3}')}
33 }
34 {pwsh} {
35 set-alias testsuite {echo (grep "report .Modules " modulecmd.tcl | tr -d \\ | awk '{print \$3}')}
36 }
37 }
38
39 # check '?' and '&' are correctly escaped
40 set-alias ts2 {echo "http://an.example.web?&param=one"}
41 # check '[' and ']' are correctly escaped
42 set-alias ts3 "echo \"select\[type==BAR && osrel==FOO\]\" myapp"