MCPcopy Create free account
hub / github.com/celer-pkg/celer / CurrentShell

Function CurrentShell

completion/completion.go:31–50  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

29)
30
31func CurrentShell() ShellType {
32 switch runtime.GOOS {
33 case "windows":
34 return TypePowerShell
35
36 case "linux":
37 shell := os.Getenv("SHELL")
38 switch shell {
39 case "/usr/bin/bash", "/bin/bash":
40 return BashShell
41 case "/usr/bin/zsh", "/bin/zsh":
42 return ZshShell
43 default:
44 return NotSupported
45 }
46
47 default:
48 panic("unsupported os: " + runtime.GOOS)
49 }
50}

Callers 1

Calls

no outgoing calls

Tested by 1