.
D 2020-08-04T16:09:02.022
J closedate 2459066.17294007
J closer sebres
J icomment The\smain\sreason\sfor\sthe\sfix\sis\sdescribed\sin\s[21b0629c81]\s(as\swell\sas\sself-descriptive\sin\stest\scases).\sShortly\sit\sis\sa\scertain\sinsanity\sby\sthe\sargument\sparsing\sin\sMS\s-\sin\sopposite\sto\s*nux\sthe\sarguments\sare\sparsed\sby\sprogram\sso\sdifferently\sif\scalled\sa\sprogram\sprocessor\s(comspec)\sand\sother\sexecutable.\r\nThe\scurrent\shandling\sof\s%-char\sis\snot\soptimal\s(see\sfurther\sticket\s[344b1a0c0f])\sand\sI'll\stry\sto\sfix\sthat,\sbut\sthis\sticket\sis\srather\sa\sduplicate,\sso\sI'll\sclose\sit\shere.\r\n\r\nAs\sfor\sthe\sfix,\sthe\smain\sissue\sis\sthat\s[https://github.com/sebres/PoC/issues/1|parameter\ssubstitution\sin\scomspec\sis\sambiguous],\sso\sproper\squoting/escape\sis\shardly\spossible\sand\s[https://github.com/microsoft/terminal/issues/250|MS\srefuses\sto\sfix\sit\sdue\sto\scompat\sreasons]\r\n\r\nThus\sat\sthe\smoment\sthe\sfix\smay\slook\slike:\r\n<ul>\r\n\s\s\s\s<li>try\sto\s"escape"\sas\ssafe\sas\spossible</li>\r\n\s\s\s\s<li>raise\sexception\s"Unpaired\squote\sfound"\s...</li>\r\n</ul>\r\nWhereas\sit\smust\sadditionally\sdistinguish\sbetween\sexecution\sof\scomspec\s(shell),\sa\sbatch-script\sand\sother\sexecutable.\sLet\salone\sthe\sescape\susing\s<code>^</code>\schar\stogether\swith\sdouble/triple\squotation\s(or\susing\s<code>\\"</code>)\sis\simpossible,\sthe\s%-char\sis\sallowed\sas\spart\sof\sfile\sname.\r\n\r\n\r\nClosed\sas\sdup\sof\s[344b1a0c0f].
J login sebres
J mimetype text/x-fossil-wiki
J resolution Duplicate
J status Closed
K efd15d181ae9be3b538eb23534d37d8f1d96cd57
U sebres
Z 0aad12df9f66cb237ca67b5d22f2c1f5