code: func SetupPluginEnv(settings helm_env.EnvSettings,
  	shortName, base string) {
  	for key, val := range map[string]string{
  		"HELM_PLUGIN_NAME": shortName,
  		"HELM_PLUGIN_DIR":  base,
  		"HELM_BIN":         os.Args[0],
  
  		// Set vars that may not have been set, and save client the
  		// trouble of re-parsing.
  		"HELM_PLUGIN": settings.PluginDirs(),
  		"HELM_HOME":   settings.Home.String(),
  
  		// Set vars that convey common information.
  		"HELM_PATH_REPOSITORY":       settings.Home.Repository(),
  		"HELM_PATH_REPOSITORY_FILE":  settings.Home.RepositoryFile(),
  		"HELM_PATH_CACHE":            settings.Home.Cache(),
  		"HELM_PATH_LOCAL_REPOSITORY": settings.Home.LocalRepository(),
  		"HELM_PATH_STARTER":          settings.Home.Starters(),
  
  		"TILLER_HOST":      settings.TillerHost,
  		"TILLER_NAMESPACE": settings.TillerNamespace,
  	} {
  		os.Setenv(key, val)
  	}
  
  	if settings.Debug {
  		os.Setenv("HELM_DEBUG", "1")
  	}
  }
docs: // SetupPluginEnv prepares os.Env for plugins. It operates on os.Env because
  // the plugin subsystem itself needs access to the environment variables
  // created here.