Documentation
¶
Overview ¶
Package shellpath is what a user 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
Index ¶
- Constants
- type Item
- type Line
- type Report
- type ShellPath
- func (s *ShellPath) Close() error
- func (s *ShellPath) Folders() []string
- func (s *ShellPath) Report(ctx context.Context) Report
- func (s *ShellPath) SetUp(ctx context.Context, files []string) ([]Line, string, error)
- func (s *ShellPath) Settling() string
- func (s *ShellPath) Start()
- func (s *ShellPath) Telling(tell func(profile, text string))
- type State
Constants ¶
const ( GroupIcebath = "icebath" GroupShells = "Shells" GroupProfiles = "Profile commands" GroupCompletions = "Completions" GroupPrograms = "Programs" GroupComputer = "This computer" )
Parts of the report, in the order it lists them
const UserPath = `HKEY_CURRENT_USER\Environment\Path`
UserPath is the Windows user PATH's registry value. Setup writes it like a file.
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 user 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
// Files lists every file the row's setup writes. UserPath means the Windows user PATH.
Files []string
}
One thing the report says
type Report ¶
type Report struct {
Items []Item
// What the user 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 ¶
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 user as icebath sets them up, and what the first start after an install finishes
func (*ShellPath) Close ¶
Stops what the first start does, waiting for it. What it did not finish is owed again at the next start
func (*ShellPath) Folders ¶
Folders icebath puts on the user'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 ¶
How the shells of this computer find icebath, the commands of the profiles and the completions, read without changing anything
func (*ShellPath) SetUp ¶
SetUp fixes what the report finds wrong: the icebath command in the command folder points to this program (on Windows, the program's folder comes first on the user PATH), every shell family's startup files that lack it get the marked PATH line, the profile command folder goes on PATH when there are profile commands, lines icebath added for a missing folder and commands of deleted profiles are removed, the completions are written, and the install stamp records what was added so an uninstall removes it. It returns each step, and the words for the user's current shell, or an error when there is no program to set up. It writes only the given files, which the report's rows list (Report.Files).
func (*ShellPath) Settling ¶
What the first start after an install does now, empty when it does nothing