MCPcopy
hub / github.com/wavetermdev/waveterm / WaveshellLocalEnvVars

Function WaveshellLocalEnvVars

pkg/util/shellutil/shellutil.go:218–232  ·  view source on GitHub ↗
(termType string)

Source from the content-addressed store, hash-verified

216}
217
218func WaveshellLocalEnvVars(termType string) map[string]string {
219 rtn := make(map[string]string)
220 if termType != "" {
221 rtn["TERM"] = termType
222 }
223 // these are not necessary since they should be set with the swap token, but no harm in setting them here
224 rtn["TERM_PROGRAM"] = "waveterm"
225 if os.Getenv("COLORTERM") == "" {
226 rtn["COLORTERM"] = "truecolor"
227 }
228 rtn["WAVETERM"], _ = os.Executable()
229 rtn["WAVETERM_VERSION"] = wavebase.WaveVersion
230 rtn["WAVETERM_WSHBINDIR"] = filepath.Join(wavebase.GetWaveDataDir(), WaveHomeBinDir)
231 return rtn
232}
233
234func UpdateCmdEnv(cmd *exec.Cmd, envVars map[string]string) {
235 if len(envVars) == 0 {

Callers 2

StartLocalShellProcFunction · 0.92
RunSimpleCmdInPtyFunction · 0.92

Calls 1

GetWaveDataDirFunction · 0.92

Tested by

no test coverage detected