env

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2023 License: ISC Imports: 13 Imported by: 0

Documentation

Overview

Package env implements the "shrt env" command

Index

Constants

This section is empty.

Variables

View Source
var Cmd = &base.Command{
	Name:      "env",
	Usage:     "shrt env [-u] [-w] [var ...]",
	ShortHelp: "print Shrt environment information",
	LongHelp: `Env prints Shrt environment information.

By default env prints information as a shell script. If one or more
variable names is given as arguments, env prints the value of each
named variable on its own line.

The -u flag requires one or more arguments and unsets
the default setting for the named environment variables,
if one has been set with 'shrt env -w'.

The -w flag requires one or more arguments of the
form NAME=VALUE and changes the default settings
of the named environment variables to the given values. If the same
NAME is provided multiple times, the last one takes effect.

For more about environment variables, see 'shrt help environment'.
	`,
}

Functions

func ConfigFromEnv

func ConfigFromEnv() shrt.Config

ConfigFromEnv returns a Config object matching the current environment.

func MergeEnv

func MergeEnv()

MergeEnv merges the program's environment with that specified in SHRTENV. Values already specified in the environment take precedence.

Types

This section is empty.

Jump to

Keyboard shortcuts

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