3 ms·
Windows doesn’t really have an ARGV though. It’s a user space abstraction for compatibility with POSIX. Windows technically just works on the principle of an e
by hnlmorg 2y ago
Windows doesn’t really have an ARGV though. It’s a user space abstraction for compatibility with POSIX.
Windows technically just works on the principle of an executable name + a single argument. And it does this for compatibility with DOS.
So you end up with this stupid escaping rules you’ve described so there are compatibility conventions at the kernel level with earlier implementations of Windows, which in turn maintained compatibility with MS-DOS. While providing a C abstraction that’s compatible with POSIX.
Which is just one of many reasons why it’s a nightmare to write cross platform shells that also target Windows.