pathshim

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PATHShim

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

func NewPATHShim

func NewPATHShim(shimDir string) (*PATHShim, error)

func (*PATHShim) CreateShim

func (s *PATHShim) CreateShim(command string) (string, error)

func (*PATHShim) GetPATHEntry

func (s *PATHShim) GetPATHEntry() string

func (*PATHShim) Install

func (s *PATHShim) Install()

Install modifies the global process PATH for backward compatibility. Deprecated: Use InstallPrep() to get the updated PATH string and pass it to child processes via exec.Cmd.Env instead.

func (*PATHShim) InstallPrep

func (s *PATHShim) InstallPrep() string

InstallPrep returns the updated PATH string with the shim directory prepended. Callers should use this to configure child process environments (exec.Cmd.Env) rather than mutating the global process environment with os.Setenv.

type PipeStripper

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

func NewPipeStripper

func NewPipeStripper() *PipeStripper

func (*PipeStripper) HasPipe

func (p *PipeStripper) HasPipe(command string) bool

func (*PipeStripper) Strip

func (p *PipeStripper) Strip(command string) string

Strip removes trailing pipe commands, respecting quoted strings. For example: `echo 'hello | world' | grep foo` → `echo 'hello | world'`

Jump to

Keyboard shortcuts

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