helper

package
v1.15.1 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SHELL_SCRIPTS = map[string]fileMap{
	"bash": {
		Key:  "bash_profile.sh",
		Path: "~/.bash_profile",
	},
	"zsh": {
		Key:  "zshrc.sh",
		Path: "~/.zshrc",
	},
	"fish": {
		Key:  "aws-sso.fish",
		Path: getFishScript(),
	},
}

map of shells to their file we edit by default

Functions

func ConfigFiles

func ConfigFiles() []string

ConfigFiles returns a list of all the config files we might edit

func InstallHelper

func InstallHelper(shell string, path string) error

InstallHelper installs any helper code into our shell startup script(s)

func SetLogger

func SetLogger(l *logrus.Logger)

func UninstallHelper

func UninstallHelper(shell string, path string) error

UninstallHelper removes any helper code from our shell startup script(s)

Types

type SourceHelper added in v1.15.0

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

func NewSourceHelper added in v1.15.0

func NewSourceHelper(getExe func() (string, error), output io.Writer) *SourceHelper

func (SourceHelper) Generate added in v1.15.0

func (h SourceHelper) Generate(shell string) error

SourceHelper can be used to generate the completions script for immediate sourcing in the active shell

Jump to

Keyboard shortcuts

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