zenity/internal/zenutil/osascripts/list.gojs

13 lines
269 B
Plaintext
Raw Normal View History

2022-06-01 19:00:08 -04:00
{{template "common" .}}
2022-05-06 08:48:31 -04:00
ObjC.import('stdio')
ObjC.import('stdlib')
try {
var res = app.chooseFromList({{json .Items}}, {{json .Options}})
} catch (e) {
$.dprintf(2, e)
$.exit(-1)
}
if (res === false) $.exit(1)
2021-07-08 13:56:28 -04:00
if (res.length !== 0) res.join({{json .Separator}})