Closed aqxa1 closed 1 year ago
Yeah, that's how getopt
works, it's intentional in wl-clipboard. It would be good to mention it in the man page, e.g. add [--]
before the arguments in the command example.
If it's possible for your use case, just FYI another way to get around this issue is by passing the text via stdin instead of on the command line.
In some cases I have text I want to copy that includes a leading "-", which
wl-copy
interprets as an option, and consequently breaks. Thankfully, the program usesgetopt
so the text can be added after specifying--
, which tells it not to interpret it as an option. Probably just documenting it would be enough, or maybe it could be made a non-positional argument (and so the text isn't interpreted by getopt).