()
| 389 | } |
| 390 | |
| 391 | func 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 | |
| 403 | func getBashProfile() string { |
| 404 | if _, err := os.Stat(os.Getenv("HOME") + "/.bashrc"); err == nil { |