From 41ec62dd6eeeeb00fb4e17c88d1a6c9c0813a892 Mon Sep 17 00:00:00 2001 From: Yanbing Date: Sat, 12 Jan 2019 22:56:14 -0800 Subject: [PATCH] Change to a table --- Remote-command-line-escaping-rules.md | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/Remote-command-line-escaping-rules.md b/Remote-command-line-escaping-rules.md index 15b6955..e88b7cd 100644 --- a/Remote-command-line-escaping-rules.md +++ b/Remote-command-line-escaping-rules.md @@ -1,4 +1,12 @@ -- Double quotes escaping issue for default shell - - for common shells, like powershell, bash, cygwin, double quotes are added to the path of default shell and its arguments, and the double quotes and backslash inside args are escaped. - - For cmd and ssh-shellhost.exe, double quotes to shell and its arguments are added without any escaping. - - For shell other than above, a registry value DefaultShellEscapeArguments" under "HKEY_LOCAL_MACHINE\SOFTWARE\OpenSSH" is added (see [DefaultShell](https://github.com/PowerShell/Win32-OpenSSH/wiki/DefaultShell)). The default value when missing is 1, which mean the escaping will happen like no.1 above. If non-escaping is preferred, this value needs to be set to 0. in later case, only double quotes are added to shell and args, like no.2 above. \ No newline at end of file + +| DefaultShell | DefaultShellEscapeArguments |ShellPath is double quoted |" and \ are escaped in arguments| +|--|--|--|--| +| powershell | 1, 0, missing | yes | yes | +| bash | 1, 0, missing | Yes | Yes| +| cygwin | 1, 0, missing | Yes | Yes | +| cmd.exe | 1, 0, missing | Yes | No | +| ssh-shellhost.exe | 1, 0, missing | Yes | No | +| Other custom shells | 1, missing | Yes | Yes | +| Other custom shells | 0 | Yes | No| + +Please refer to [DefaultShell](https://github.com/PowerShell/Win32-OpenSSH/wiki/DefaultShell) for setting DefaultShell and DefaultShellEscapeArguments. \ No newline at end of file