I'm having some trouble with using an inlist with square brackets, e.g.
Code:
program:
coll = $#kobocoll;
first_non_empty
(
if '[Send to Device]' inlist coll then 'sync.png' fi,
if "[Kobo Store]" inlist coll then 'drm-locked.png' fi,
)
incorrectly marks
every book with sync.png (and if I comment the line out, then drm-locked.png). It doesn't happen if I remove the square brackets. Technically it's still working as it's not exact and still matches, but what is going on?
EDIT: I think I know what's happening. I forgot about regex. Putting in slashes to.... break (I forgot the actual word) them makes it work.
EDIT: Is there a better way to merge three lists then this? I'm a bit surprised that list_union doesn't handle more than 2 lists.
Code:
new_entries = list_union(first_list, second_list, ',';
new_list = list_union(new_entries, third_list, ',')