shell

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package shell holds the sourced shim templates and helpers for emitting shell-appropriate environment statements.

Index

Constants

This section is empty.

Variables

View Source
var Supported = []string{"bash", "zsh", "fish"}

Supported shells for `gcloudenv init`.

Functions

func ExportStatement

func ExportStatement(shellName, key, value string) string

ExportStatement renders "set VAR to value" in the syntax of the target shell. shellName "fish" uses `set -gx`; everything else uses POSIX `export`.

func Init

func Init(name string) (string, error)

Init returns the integration snippet to be sourced for the given shell. bash and zsh share a template.

Types

This section is empty.

Jump to

Keyboard shortcuts

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