shell

package
v0.0.0-...-a418d69 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NU              = "nu"
	NuEnvBlockStart = "export-env {\n"
	NuEnvBlockEnd   = "\n}"
)
View Source
const (
	ZSH  = "zsh"
	BASH = "bash"
)
View Source
const (
	CMD = "cmd"
)
View Source
const (
	FISH = "fish"
)
View Source
const (
	TCSH = "tcsh"
)
View Source
const (
	UNKNOWN = "unknown"
)
View Source
const (
	XONSH = "xonsh"
)

Variables

View Source
var (
	DotFile strings.Builder
)

Functions

func Name

func Name() string

func NuInit

func NuInit(script string) error

Types

type Aliae

type Aliae []*Alias

func (Aliae) Render

func (a Aliae) Render()

type Alias

type Alias struct {
	Name  string   `yaml:"name"`
	Value Template `yaml:"value"`
	Type  Type     `yaml:"type"`
	If    If       `yaml:"if"`

	// PowerShell only options
	Description string `yaml:"description"`
	Force       bool   `yaml:"force"`
	Option      Option `yaml:"option"`
	Scope       Option `yaml:"scope"`
	// contains filtered or unexported fields
}

type Echo

type Echo struct {
	Message string
	// contains filtered or unexported fields
}

func (*Echo) Error

func (e *Echo) Error() *Echo

func (*Echo) String

func (e *Echo) String() string

type Env

type Env struct {
	Name      string      `yaml:"name"`
	Value     interface{} `yaml:"value"`
	Delimiter Template    `yaml:"delimiter"`
	If        If          `yaml:"if"`
	Persist   bool        `yaml:"persist"`
	Type      EnvType     `yaml:"type"`
	// contains filtered or unexported fields
}

type EnvType

type EnvType string
const (
	String EnvType = "string"
	Array  EnvType = "array"
)

type Envs

type Envs []*Env

func (Envs) Render

func (e Envs) Render()

type If

type If string

func (If) Ignore

func (i If) Ignore() bool

type Option

type Option string
const (
	PWSH = "pwsh"

	AllScope    Option = "AllScope"
	Constant    Option = "Constant"
	ReadOnly    Option = "ReadOnly"
	None        Option = "None"
	Unspecified Option = "Unspecified"

	Private Option = "Private"

	Global         Option = "Global"
	Local          Option = "Local"
	NumberedScopes Option = "Numbered scopes"
	ScriptScope    Option = "Script"
)

type Path

type Path struct {
	Value   Template `yaml:"value"`
	If      If       `yaml:"if"`
	Persist bool     `yaml:"persist"`
	Force   bool     `yaml:"force"`
	// contains filtered or unexported fields
}

type Paths

type Paths []*Path

func (Paths) Render

func (p Paths) Render()

type Script

type Script struct {
	Value Template `yaml:"value"`
	If    If       `yaml:"if"`
}

func (*Script) String

func (s *Script) String() string

type Scripts

type Scripts []*Script

func (Scripts) Render

func (s Scripts) Render()

type Template

type Template string

func (Template) Parse

func (t Template) Parse() Template

func (Template) String

func (t Template) String() string

type Type

type Type string
const (
	Command  Type = "command"
	Function Type = "function"
	Git      Type = "git"
)

Jump to

Keyboard shortcuts

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