This allows PhutilCommandString to escape as Powershell.
Details
Details
- Reviewers
- epriestley 
- Group Reviewers
- Blessed Reviewers 
- Commits
- rPHU49f08a756a54: Allow PhutilCommandString to escape as Powershell
Unit tests
Diff Detail
Diff Detail
- Repository
- rPHU libphutil
- Branch
- escape-powershell
- Lint
- Lint Passed 
- Unit
- Tests Passed 
- Build Status
- Buildable 2202 - Build 2206: [Placeholder Plan] Wait for 30 Seconds 
Event Timeline
| src/xsprintf/PhutilCommandString.php | ||
|---|---|---|
| 33–36 | Let's make this setEscapingMode(PhutilCommandString::MODE_POWERSHELL) or similar. | |
| 43 | ...then pass 'mode' | |
| src/xsprintf/__tests__/PhutilCsprintfTestCase.php | ||
| 27 | Then eventually this test would become setEscapingMode(PhutilCommandString::MODE_LINUX) and the test would work under windows, in a future far away. | |
| src/xsprintf/csprintf.php | ||
| 111–112 | Let's move this to PhutilCommandString::escapeArgument($argument, $mode = PhutilCommandString::MODE_DEFAULT) instead of defining a new escapepowershell. That should reduce code duplication too, and make real modal operation easy to implement later. | |
| 149 | In single quotes, I think this means literally "backslash a". | |
| 150 | Same issue here, this is "backslash b" | |