prompt

package
v0.0.0-...-f9543a5 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2023 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exec

func Exec(args []string) int

Exec executes the prettyprompt applet and returns an exit code (0 for success, >0 for error).

Types

type Directory

type Directory struct {
	Path                  string
	DisplayPath           string //formatted for display in prompt line
	TitlePath             string //formatted for display in TerminalTitle
	InBuildTree           bool
	InRepoTree            bool
	Repo                  *gitRepo
	NearestAccessiblePath string
}

Directory contains all data about a directory that the prompt needs.

func CurrentDirectory

func CurrentDirectory() Directory

CurrentDirectory prepares a Directory struct for the current working directory.

func NewDirectory

func NewDirectory(path string) (dir Directory)

NewDirectory prepares a Directory struct for the given path.

type TerminalTitle

type TerminalTitle struct {
	HostName string
	Path     string
}

TerminalTitle contains all pieces that go into the terminal title.

func (TerminalTitle) PrintTo

func (t TerminalTitle) PrintTo(stdout io.Writer)

PrintTo produces the VT command that sets the terminal title.

Jump to

Keyboard shortcuts

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