Skip to content

Commit

Permalink
Add 'none' shell for docker-env output
Browse files Browse the repository at this point in the history
This is for consumers who want the key/value output, but don't need the
shell directives.
  • Loading branch information
r2d4 committed Aug 4, 2017
1 parent dde62b5 commit a02541d
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions cmd/minikube/cmd/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ const (
bashUnsetPfx = "unset "
bashUnsetSfx = "\n"
bashUnsetDelim = ""

nonePfx = ""
noneSfx = "\n"
noneDelim = "="
)

var usageHintMap = map[string]string{
Expand Down Expand Up @@ -204,6 +208,11 @@ func shellCfgSet(api libmachine.API) (*ShellConfig, error) {
shellCfg.Prefix = emacsSetPfx
shellCfg.Suffix = emacsSetSfx
shellCfg.Delimiter = emacsSetDelim
case "none":
shellCfg.Prefix = nonePfx
shellCfg.Suffix = noneSfx
shellCfg.Delimiter = noneDelim
shellCfg.UsageHint = ""
default:
shellCfg.Prefix = bashSetPfx
shellCfg.Suffix = bashSetSfx
Expand Down Expand Up @@ -245,6 +254,11 @@ func shellCfgUnset() (*ShellConfig, error) {
shellCfg.Prefix = emacsUnsetPfx
shellCfg.Suffix = emacsUnsetSfx
shellCfg.Delimiter = emacsUnsetDelim
case "none":
shellCfg.Prefix = nonePfx
shellCfg.Suffix = noneSfx
shellCfg.Delimiter = noneDelim
shellCfg.UsageHint = ""
default:
shellCfg.Prefix = bashUnsetPfx
shellCfg.Suffix = bashUnsetSfx
Expand Down

0 comments on commit a02541d

Please sign in to comment.