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 33 interpolate =
44 let
55 shell = devshell . mkShell {
6- devshell . menu . interpolate = true ;
7- commands = [
6+ devshell . menu = {
7+ interpolate = true ;
8+ width = 200 ;
9+ } ;
10+ commands . scripts = [
811 { prefix = "hello" ; help = ''hello from "$PRJ_ROOT"!'' ; }
912 { prefix = "hola" ; help = ''hola from '\$PRJ_ROOT'!'' ; }
13+ { prefix = "hallo" ; help = ''hallo from "$PRJ_ROOT"!'' ; interpolate = false ; }
1014 ] ;
1115 } ;
1216 in
1317 runTest "interpolate" { } ''
1418 # Check interpolation is enabled
15- eval ${ shell } /bin/menu | grep "hello from \"$PRJ_ROOT\"!"
19+ ( eval ${ shell } /bin/menu | grep "hello from \"$PRJ_ROOT\"!" )
1620
1721 # 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"!' )
1926 '' ;
2027}
You can’t perform that action at this time.
0 commit comments