MCPcopy Create free account
hub / github.com/Sma1lboy/RegTool / NewShellManager

Function NewShellManager

shell/shell_manager.go:27–35  ·  view source on GitHub ↗

NewShellManager creates a new ShellManager based on the current shell.

()

Source from the content-addressed store, hash-verified

25
26// NewShellManager creates a new ShellManager based on the current shell.
27func NewShellManager() (ShellManager, error) {
28 shell := os.Getenv("SHELL")
29 for name, factory := range shellFactories {
30 if strings.Contains(shell, name) {
31 return factory(), nil
32 }
33 }
34 return nil, fmt.Errorf("unsupported shell: %s", shell)
35}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected