cmd

package
v0.0.0-...-7426b64 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const Name string = "cmd"

Variables

This section is empty.

Functions

This section is empty.

Types

type CmdEnv

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

func NewCmdEnv

func NewCmdEnv(userScope bool) *CmdEnv

func (*CmdEnv) Get

func (c *CmdEnv) Get(name string) (string, error)

Get retrieves a variable from the user environment, this prioritizes a backup if it exists

func (*CmdEnv) GetUnsafe

func (c *CmdEnv) GetUnsafe(name string) string

GetUnsafe is an alias for `get` intended for use by tests/integration tests, don't use for anything else!

func (*CmdEnv) Set

func (c *CmdEnv) Set(name, newValue string) error

Set sets a variable in the user environment and saves the original as a backup

type OpenKeyFn

type OpenKeyFn func(path string) (osutils.RegistryKey, error)

type SubShell

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

SubShell covers the subshell.SubShell interface, reference that for documentation

func (*SubShell) Activate

func (v *SubShell) Activate(prj *project.Project, cfg sscommon.Configurable, out output.Outputer) error

Activate - see subshell.SubShell

func (*SubShell) Binary

func (v *SubShell) Binary() string

Binary - see subshell.SubShell

func (*SubShell) CleanUserEnv

func (v *SubShell) CleanUserEnv(cfg sscommon.Configurable, envType sscommon.RcIdentification, userScope bool) error

func (*SubShell) Deactivate

func (v *SubShell) Deactivate() error

Deactivate - see subshell.SubShell

func (*SubShell) EnsureRcFileExists

func (v *SubShell) EnsureRcFileExists() error

func (*SubShell) Errors

func (v *SubShell) Errors() <-chan error

Errors returns a channel for receiving errors related to active behavior

func (*SubShell) IsActive

func (v *SubShell) IsActive() bool

IsActive - see subshell.SubShell

func (*SubShell) IsAvailable

func (v *SubShell) IsAvailable() bool

func (*SubShell) Quote

func (v *SubShell) Quote(value string) string

Quote - see subshell.Quote

func (*SubShell) RcFile

func (v *SubShell) RcFile() (string, error)

func (*SubShell) RemoveLegacyInstallPath

func (v *SubShell) RemoveLegacyInstallPath(_ sscommon.Configurable) error

func (*SubShell) Run

func (v *SubShell) Run(filename string, args ...string) error

Run - see subshell.SubShell

func (*SubShell) SetBinary

func (v *SubShell) SetBinary(binary string)

SetBinary - see subshell.SubShell

func (*SubShell) SetEnv

func (v *SubShell) SetEnv(env map[string]string) error

SetEnv - see subshell.SetEnv

func (*SubShell) SetupShellRcFile

func (v *SubShell) SetupShellRcFile(targetDir string, env map[string]string, namespace *project.Namespaced, cfg sscommon.Configurable) error

SetupShellRcFile - subshell.SubShell

func (*SubShell) Shell

func (v *SubShell) Shell() string

Shell - see subshell.SubShell

func (*SubShell) WriteCompletionScript

func (v *SubShell) WriteCompletionScript(completionScript string) error

func (*SubShell) WriteUserEnv

func (v *SubShell) WriteUserEnv(cfg sscommon.Configurable, env map[string]string, envType sscommon.RcIdentification, userScope bool) error

WriteUserEnv - see subshell.SubShell

Jump to

Keyboard shortcuts

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