(termType string)
| 216 | } |
| 217 | |
| 218 | func 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 | |
| 234 | func UpdateCmdEnv(cmd *exec.Cmd, envVars map[string]string) { |
| 235 | if len(envVars) == 0 { |
no test coverage detected