File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change 3
3
interpolate =
4
4
let
5
5
shell = devshell . mkShell {
6
- devshell . menu . interpolate = true ;
7
- commands = [
6
+ devshell . menu = {
7
+ interpolate = true ;
8
+ width = 200 ;
9
+ } ;
10
+ commands . scripts = [
8
11
{ prefix = "hello" ; help = ''hello from "$PRJ_ROOT"!'' ; }
9
12
{ prefix = "hola" ; help = ''hola from '\$PRJ_ROOT'!'' ; }
13
+ { prefix = "hallo" ; help = ''hallo from "$PRJ_ROOT"!'' ; interpolate = false ; }
10
14
] ;
11
15
} ;
12
16
in
13
17
runTest "interpolate" { } ''
14
18
# Check interpolation is enabled
15
- eval ${ shell } /bin/menu | grep "hello from \"$PRJ_ROOT\"!"
19
+ ( eval ${ shell } /bin/menu | grep "hello from \"$PRJ_ROOT\"!" )
16
20
17
21
# Check escaped variable
18
- eval ${ shell } /bin/menu | grep 'hola from '\''' $PRJ_ROOT'\'
22
+ ( eval ${ shell } /bin/menu | grep 'hola from '\''' $PRJ_ROOT'\' )
23
+
24
+ # Check non-interpolated variable
25
+ ( eval ${ shell } /bin/menu | grep 'hallo from "$PRJ_ROOT"!' )
19
26
'' ;
20
27
}
You can’t perform that action at this time.
0 commit comments