(name: string)
| 41 | } |
| 42 | |
| 43 | function powershellNotes(name: string) { |
| 44 | if (name === "pwsh") { |
| 45 | return `# PowerShell (7+) shell notes |
| 46 | - This cross-platform shell supports pipeline chain operators (\`&&\` and \`||\`). |
| 47 | - Use double quotes for interpolated strings (\`"Hello $name"\`), single quotes for verbatim strings. |
| 48 | - Prefer full cmdlet names like \`Get-ChildItem\`, \`Set-Content\`, \`Remove-Item\`, and \`New-Item\` over aliases. |
| 49 | - Use \`$(...)\` for subexpressions. Use \`@(...)\` for array expressions. |
| 50 | - To call a native executable whose path contains spaces, use the call operator: \`& "path/to/exe" args\`. |
| 51 | - Escape special characters with the PowerShell backtick character.` |
| 52 | } |
| 53 | if (name === "powershell") { |
| 54 | return `# Windows PowerShell (5.1) shell notes |
| 55 | - Use \`cmd1; if ($?) { cmd2 }\` to chain dependent commands. |
| 56 | - Use double quotes for interpolated strings (\`"Hello $name"\`), single quotes for verbatim strings. |
| 57 | - Prefer full cmdlet names like \`Get-ChildItem\`, \`Set-Content\`, \`Remove-Item\`, and \`New-Item\` over aliases. |
| 58 | - Use \`$(...)\` for subexpressions. Use \`@(...)\` for array expressions. |
| 59 | - To call a native executable whose path contains spaces, use the call operator: \`& "path/to/exe" args\`. |
| 60 | - Escape special characters with the PowerShell backtick character.` |
| 61 | } |
| 62 | return "" |
| 63 | } |
| 64 | |
| 65 | function chainGuidance(name: string) { |
| 66 | if (name === "powershell") { |
no outgoing calls
no test coverage detected