Combination of spaces and single backslash results in incorrect command-line-arguments
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Invalid
|
Undecided
|
Unassigned |
Bug Description
- Windows 11 (Version 10.0.22631 Build 22631)
- SBCL 2.3.1
I am trying to use the "--script" option and pass some paths as arguments.
Given the following "test" script
test.lisp:
```lisp
(format t "~s~%" (cdr sb-ext:
```
Case 1
When calling it *from powershell* in the following way: `sbcl --script .\test.lisp "abc\"` it correctly interprets that it is 1 argument `("abc\\")` it also correctly escapes the `\`.
Case 2
Adding a space anywhere in first argument i.e. ``sbcl --script .\test.lisp "ab c\"`` attempts to escape the double-quote in the first arg resulting in the following output ("ab c\"").
I tried the tests from cmd.exe and in both cases the double-quote gets escaped instead of escaping `\`.
The issue only occurs if the `\` is before a double-quoute. This is true for both both environments (cmd.exe, powershell.exe).
running the same test in WSL works fine.
Apologies for filing this bug. This is related to how cmd.exe and powershell handle double-quotes and has nothing to do with sbcl. Marking as Invalid.