hluk / copyq-commands

Useful commands for CopyQ clipboard manager.
338 stars 73 forks source link

Join Selected Items, execve Argument list too long #51

Closed rachmadaniHaryono closed 2 years ago

rachmadaniHaryono commented 2 years ago

Subject of the issue

when running join selected items with a lot of items, it will fail with error execve Argument list too long and no item will be created but selected items are deleted

issue happened on 300 items of urls

[Command]
Command="
    copyq add %1"
Icon=\xf066
InMenu=true
Name=Join Selected Items
Remove=true
Shortcut=space

Your environment

CopyQ Clipboard Manager v3.13.0 Qt: 5.14.2 Compiler: GCC Arch: x86_64-little_endian-lp64 OS: Ubuntu 21.10

Steps to reproduce

  1. add command to copyq
  2. create lot of items
  3. select all and run the command

Expected behaviour

item succesfully created

or

item not succesfully created but selected items are not deleted

Actual behaviour

Comment

this is similar issue to https://github.com/hluk/CopyQ/issues/1573 but the solution is to rewrite the command

i am not familiar enough with javascript or bash to rewrite the command, and also there is no example to get selected items to python

is it possible to add option to not remove selected item when command error ?

hluk commented 2 years ago

Fixed. Thanks for the detailed report! :+1: