Maximum length of command line argument

I was trying to find something regarding the maximum length of a command line argument, for example, I compile program.cr and run

$ program “I want to pass a long string to the program, how long can it be”

My question would be, what is the maximum length of ARGV[0] in this case. Or is that a limitation of the OS?

Yes, this entirely depends on the operating system. Crystal’s ARGV can handle basically anything.

Just a FYI, my organizations security (eset) blocked that link.

1 Like

Hmm.
It doesn’t look like a suspicious website to me. But there’s nothing you can do about it. It often happens that websites are blocked due to company policies. Thanks.