MCPcopy Create free account
hub / github.com/wonderwhy-er/DesktopCommanderMCP / getExpectedShellOutput

Function getExpectedShellOutput

test/test-default-shell.js:71–87  ·  view source on GitHub ↗

* Get expected shell output for a given shell path

(shellPath)

Source from the content-addressed store, hash-verified

69 * Get expected shell output for a given shell path
70 */
71function getExpectedShellOutput(shellPath) {
72 switch (shellPath) {
73 case '/bin/sh':
74 return ['/bin/sh'];
75 case '/bin/bash':
76 return ['/bin/bash', 'bash'];
77 case 'cmd':
78 case 'cmd.exe':
79 return ['cmd', 'cmd.exe'];
80 case 'pwsh':
81 return ['pwsh'];
82 case 'powershell':
83 return ['powershell'];
84 default:
85 return [shellPath];
86 }
87}
88/**
89 * Execute echo $0 command and extract the shell name from the output
90 * For Windows shells, use appropriate commands

Callers 5

testDefaultShellShFunction · 0.85
testDefaultShellBashFunction · 0.85
testDefaultShellCmdFunction · 0.85
testDefaultShellPwshFunction · 0.85
testShellSwitchingFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected