Avoid duplicates with --save-as and --split-layers

Hello guys,

as the title mentions I am looking for a way to avoid duplicates using the cli commands –split-layers and –save-as. With –sheet it’s working like a charm, but on exporting single files with –save-as, duplicates are exported multiple times.
What I have tried so far:
Working –sheet examples
aseprite -b --split-layers test.aseprite --merge-duplicates --sheet test.png
aseprite -b --split-layers test.aseprite --sheet-pack --sheet test.png
With this commands, linked cells are merged to one region in the sheet, great!

Not working –save-as examples
aseprite -b --split-layers test.aseprite --merge-duplicates --save-as test.png
aseprite -b --split-layers test.aseprite --sheet-pack --save-as test.png
With this commands, linked cells are exported in multiple files (1 file per frame) so I have to remove duplicates manually.

Is there a way to do this with –save-as?

Greetings

Solution is available here: