shellpath

package
v2.0.4-main.1 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2026 License: MIT Imports: 22 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package shellpath is what a person types in the shells of this computer: the command icebath and the shell commands of the profiles on the PATH of every shell they use, with the completions of icebath, looked at and put right from inside the program; and what an install script leaves the program to finish the first time it starts, the completions and the programs its features use

Index

Constants

View Source
const (
	GroupIcebath     = "icebath"
	GroupShells      = "Shells"
	GroupProfiles    = "Commands of profiles"
	GroupCompletions = "Completions"
	GroupPrograms    = "Programs"
	GroupComputer    = "This computer"
)

Parts of the report, in the order it lists them

Variables

This section is empty.

Functions

This section is empty.

Types

type Item

type Item struct {
	Group, Title string
	// What it is of, such as a file or a folder, as a person reads it
	Value string
	State State
	// More about it and what to do about it, whole sentences; Fix empty when nothing is to be done
	Detail, Fix string
	// Setting up puts it right
	Repairs bool
	// Name of the row, the same from one look to the next, which a finding of the doctor is keyed by
	Key string
}

One thing the report says

type Line

type Line struct {
	Text  string
	State State
}

One thing setting up did or could not do, in the state it leaves

type Report

type Report struct {
	Items []Item
	// What the person does for the shell they are in, empty when it finds this icebath already
	Running string
	// What the first start after an install does now, empty when nothing
	Settling string
}

How the shells of this computer find icebath and the commands of the profiles

func (Report) Repairable

func (r Report) Repairable() bool

Whether any row is wrong in a way setting up puts right

type ShellPath

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

The shells of the person as icebath sets them up, and what the first start after an install finishes

func New

func New(cfg *config.Config, pk *packages.Packages) *ShellPath

func (*ShellPath) Close

func (s *ShellPath) Close() error

Stops what the first start does, waiting for it; what it did not finish is owed again at the next start

func (*ShellPath) Folders

func (s *ShellPath) Folders() []string

Folders icebath puts on the person's PATH that are there: the folder of the command of this install, that of the profiles' commands, and those the lines icebath added to startup files name

func (*ShellPath) Report

func (s *ShellPath) Report(ctx context.Context) Report

How the shells of this computer find icebath, the commands of the profiles and the completions, read without changing anything

func (*ShellPath) SetUp

func (s *ShellPath) SetUp(ctx context.Context) ([]Line, string, error)

Puts right what the report finds wrong: the command icebath of the folder of commands leading to this program (on Windows the program's folder first on the user PATH), the marked line in the startup files of every family of shells the person uses that do not put that folder on PATH, the folder of the profiles' commands on PATH when there are some, the lines icebath added for a folder that is gone and the commands of profiles that are gone taken out, the completions written, and what it added recorded in the stamp of the install so an uninstall removes it. What it did, line by line, and the words for the shell the person is in; an error when there is no program to set up

func (*ShellPath) Settling

func (s *ShellPath) Settling() string

What the first start after an install does now, empty when it does nothing

func (*ShellPath) Start

func (s *ShellPath) Start()

Starts what the first start after an install owes in the background, once the settings are read: the completions of the person's shells, then the programs the features use, as alpha's installer got them ready, once On battery lets downloads run. A container image carries its own and is owed neither; a source checkout and a build given out by a developer get their programs as features first need them

func (*ShellPath) Telling

func (s *ShellPath) Telling(tell func(profile, text string))

Names how the person is told what the first start after an install did, in the sessions of the profile in use

type State

type State string

How a row of the report stands

const (
	// Set up and working
	Good State = "good"
	// Works, or works in part, and something needs a look
	Warn State = "warn"
	// Does not work
	Bad State = "bad"
	// A fact worth knowing
	Note State = "note"
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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