MCPcopy
hub / github.com/canopy-network/canopy / detectShell

Function detectShell

cmd/cli/cli.go:391–401  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

389}
390
391func detectShell() string {
392 shell := os.Getenv("SHELL")
393 if strings.Contains(shell, "bash") {
394 return "bash"
395 } else if strings.Contains(shell, "zsh") {
396 return "zsh"
397 } else if strings.Contains(shell, "fish") {
398 return "fish"
399 }
400 return ""
401}
402
403func getBashProfile() string {
404 if _, err := os.Stat(os.Getenv("HOME") + "/.bashrc"); err == nil {

Callers 1

cli.goFile · 0.85

Calls 1

ContainsMethod · 0.65

Tested by

no test coverage detected