MCPcopy Index your code
hub / github.com/wavetermdev/waveterm / EncodeEnvVarsForShell

Function EncodeEnvVarsForShell

pkg/util/shellutil/tokenswap.go:135–146  ·  view source on GitHub ↗
(shellType string, env map[string]string)

Source from the content-addressed store, hash-verified

133}
134
135func EncodeEnvVarsForShell(shellType string, env map[string]string) (string, error) {
136 switch shellType {
137 case ShellType_bash, ShellType_zsh:
138 return encodeEnvVarsForBash(env)
139 case ShellType_fish:
140 return encodeEnvVarsForFish(env)
141 case ShellType_pwsh:
142 return encodeEnvVarsForPowerShell(env)
143 default:
144 return "", fmt.Errorf("unknown or unsupported shell type for env var encoding: %s", shellType)
145 }
146}

Callers 1

tokenCmdRunFunction · 0.92

Calls 3

encodeEnvVarsForBashFunction · 0.85
encodeEnvVarsForFishFunction · 0.85

Tested by

no test coverage detected