@@ -31,11 +31,11 @@ Example: json.org https://json.org/example.html
31
31
EOT
32
32
printf " \njson.bash jb CLI:\n"
33
33
34
- # jb's @= /file references combined with shell process substitution allow jb
34
+ # jb's @/file references combined with shell process substitution allow jb
35
35
# calls to nest:
36
- jb menu:json@= <(
37
- jb id=file value=File popup:json@= <(
38
- jb menuitem:json[]@= <(
36
+ jb menu:json@<(
37
+ jb id=file value=File popup:json@<(
38
+ jb menuitem:json[]@<(
39
39
jb value=New onclick=" CreateNewDoc()" ; \
40
40
jb value=Open onclick=" OpenDoc()" ; \
41
41
jb value=Close onclick=" CloseDoc()"
@@ -46,7 +46,7 @@ jb menu:json@=<(
46
46
# Or nest jb calls with command substitution
47
47
jb menu:json=" $(
48
48
jb id=file value=File popup:json=" $(
49
- jb menuitem:json[]=" $(
49
+ jb menuitem:json[$' \n ' ]=" $(
50
50
jb value=New onclick=" CreateNewDoc()" ; \
51
51
jb value=Open onclick=" OpenDoc()" ; \
52
52
jb value=Close onclick=" CloseDoc()"
@@ -62,7 +62,7 @@ export menuitems=$(
62
62
)
63
63
# Or temporary files
64
64
tmp=$( mktemp -d)
65
- jb menuitem:json[]@= menuitems > " ${tmp:? } /popup" # the filename is used as the key
65
+ jb menuitem:json[$' \n ' ]@ menuitems > " ${tmp:? } /popup" # the filename is used as the key
66
66
export menu=$( jb id=file value=File @" ${tmp:? } " /popup:json)
67
67
# Environment variables can be explicitly passed without exporting globally
68
68
menu=${menu:? } jb @menu:json
@@ -92,9 +92,9 @@ Example: https://datatracker.ietf.org/doc/html/rfc8259#section-13
92
92
EOT
93
93
printf " \njson.bash jb CLI:\n"
94
94
95
- jb Image:json@= <(
95
+ jb Image:json@<(
96
96
jb Width:number=800 Height:number=600 Title=" View from 15th Floor" \
97
- Thumbnail:json@= <(
97
+ Thumbnail:json@<(
98
98
jb url=" http://www.example.com/image/481989943" height:number=125 \
99
99
width:number=100
100
100
) \
0 commit comments