shellhook

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: May 7, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Result

type Result struct {
	Path    string
	Updated bool // false = already present (Add) or line not found (Remove)
}

Result describes what happened to a single profile file.

func Add

func Add(line, comment string) ([]Result, error)

Add appends comment and line to every existing profile that does not already contain line as a complete line. Returns one Result per candidate profile found on disk.

func Remove

func Remove(line, comment string) ([]Result, error)

Remove strips every occurrence of line (full-line match) and any immediately preceding line equal to comment from all existing profiles. Returns one Result per candidate profile found on disk.

Jump to

Keyboard shortcuts

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