shell

package
v0.5.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 11, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetShellCommand

func GetShellCommand(shellType ShellType, command string) (string, []string)

GetShellCommand returns the command and arguments to execute the shell

func GetShellDescription

func GetShellDescription(shellType ShellType) string

GetShellDescription returns a description for the given shell type

func IsWindows

func IsWindows() bool

IsWindows returns true if running on Windows

Types

type ShellType

type ShellType int

ShellType represents the type of shell to use for command execution

const (
	ShellBash ShellType = iota
	ShellPowerShell
	ShellGitBash
	ShellPOSIX
)

func DetectShell

func DetectShell() (ShellType, error)

DetectShell determines the best available shell for the current platform

func ParseShellType

func ParseShellType(s string) ShellType

ParseShellType converts a shell type string (e.g. "bash", "powershell", "git-bash", "posix") back to a ShellType. Unknown values fall back to bash.

func (ShellType) String

func (s ShellType) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL