If you can find a copy of the UNIX Shell I ported/wrote for MS-DOS (but
also got to work on OS/2, WinNT), there is a source file in there which
may help you. You need: ms_sh23s.zip (I found a copy under https://ftp-
of all places). The main
source is a replacement for stdargv - stdargv.c, but you may need some of
the other files (director.c, etc.). I've not looked at this for over 15
years, but at the time, I used it by replacing the MS/IBM object in the
approach library. Whether it still works, I've no idea - not really used
OS/2 for years.
From memory, the only this I did was compile it, replace the version in
the library and then any executable built using that library did a unix-
like command line expansion - it even handled quotes. Only thing to
beware of it that it uses UNIX directory separators and backslashes as
escapes. From memory, OS/2 worked with either / or \ as the directory
separator, but I may be wrong. In which case, it's left as an exercise
for the keen student to covert appropriately.
Hope this helps.