shell

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBinaryPath

func GetBinaryPath() (string, error)

GetBinaryPath returns the path to the termonaut binary

func GetCurrentWorkingDir

func GetCurrentWorkingDir() string

GetCurrentWorkingDir returns the current working directory

func GetTerminalPID

func GetTerminalPID() int

GetTerminalPID returns the current terminal process ID

func ValidateShellInstallation

func ValidateShellInstallation() error

ValidateShellInstallation checks if the shell integration is working

Types

type HookInstaller

type HookInstaller struct {
	// contains filtered or unexported fields
}

HookInstaller handles shell hook installation

func NewHookInstaller

func NewHookInstaller(binaryPath string) (*HookInstaller, error)

NewHookInstaller creates a new hook installer

func (*HookInstaller) GetShellType

func (h *HookInstaller) GetShellType() ShellType

GetShellType returns the detected shell type

func (*HookInstaller) Install

func (h *HookInstaller) Install() error

Install installs the shell hook

func (*HookInstaller) InstallWithForce

func (h *HookInstaller) InstallWithForce(force bool) error

InstallWithForce installs the shell hook with force option

func (*HookInstaller) IsInstalled

func (h *HookInstaller) IsInstalled() (bool, error)

IsInstalled checks if the hook is already installed

func (*HookInstaller) Uninstall

func (h *HookInstaller) Uninstall() error

Uninstall removes the shell hook

type ShellType

type ShellType string

ShellType represents different shell types

const (
	// Zsh shell
	Zsh ShellType = "zsh"
	// Bash shell
	Bash ShellType = "bash"
	// Fish shell
	Fish ShellType = "fish"
	// PowerShell
	PowerShell ShellType = "powershell"
)

Jump to

Keyboard shortcuts

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