Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompletionInstallPath ¶
CompletionInstallPath returns the filesystem path where completion scripts should be installed for the given shell. On macOS with Homebrew (detected via HOMEBREW_PREFIX), uses Homebrew directories for bash and zsh. Otherwise uses XDG-based defaults. Returns an error if the user's home directory cannot be determined when needed (i.e., when no XDG/Homebrew override is set).
func GenerateActivationScript ¶
GenerateActivationScript returns the shell integration script for the given shell.
func ShellIntegratedCommands ¶
func ShellIntegratedCommands() []string
ShellIntegratedCommands returns the list of commands that require shell integration. These commands output shell code to stdout that must be eval'd by the parent shell.
Types ¶
type Shell ¶
type Shell string
Shell represents a supported shell type.
func DetectShell ¶
func DetectShell() Shell
DetectShell detects the current shell from the $SHELL environment variable. Falls back to bash if unrecognized.
func ParseShell ¶
ParseShell converts a string to a Shell type. Returns an error if the shell is not recognized.