* Get the preferred shell for the current platform * @returns The preferred shell command or path
()
| 11 | * @returns The preferred shell command or path |
| 12 | */ |
| 13 | function getPreferredShell(): string { |
| 14 | const platform = os.platform(); |
| 15 | |
| 16 | if (platform === "win32") { |
| 17 | return "powershell.exe"; |
| 18 | } else if (platform === "darwin") { |
| 19 | return process.env.SHELL || "/bin/zsh"; |
| 20 | } else { |
| 21 | // Linux and other Unix-like systems |
| 22 | return process.env.SHELL || "/bin/bash"; |
| 23 | } |
| 24 | } |
| 25 | |
| 26 | const PLATFORM_INFO = `Choose terminal commands and scripts optimized for ${os.platform()} and ${os.arch()} and shell ${getPreferredShell()}.`; |
| 27 |