Documentation
¶
Index ¶
- Constants
- func DeclMapFromState(state *packet.ShellState) map[string]*DeclareDeclType
- func DeclsEqual(compareName bool, d1 *DeclareDeclType, d2 *DeclareDeclType) bool
- func DumpVarMapFromState(state *packet.ShellState)
- func EnvMapFromState(state *packet.ShellState) map[string]string
- func RemoveFunc(funcs string, toRemove string) string
- func SerializeDeclMap(declMap map[string]*DeclareDeclType) []byte
- func ShellStateVarsToMap(shellVars []byte) map[string][]byte
- func ShellVarMapFromState(state *packet.ShellState) map[string]string
- func StrMapToShellStateVars(varMap map[string][]byte) []byte
- type DeclareDeclType
- func (d *DeclareDeclType) AddFlag(flag string)
- func (d *DeclareDeclType) DataType() string
- func (d *DeclareDeclType) IsArray() bool
- func (d *DeclareDeclType) IsAssocArray() bool
- func (d *DeclareDeclType) IsExport() bool
- func (d *DeclareDeclType) IsReadOnly() bool
- func (d *DeclareDeclType) IsUniqueArray() bool
- func (d *DeclareDeclType) IsZshScalarBound() bool
- func (d *DeclareDeclType) Serialize() []byte
- func (d *DeclareDeclType) SortZshFlags()
- func (d *DeclareDeclType) UnescapedValue() string
Constants ¶
View Source
const ( DeclTypeArray = "array" DeclTypeAssocArray = "assoc" DeclTypeInt = "int" DeclTypeNormal = "normal" )
Variables ¶
This section is empty.
Functions ¶
func DeclMapFromState ¶
func DeclMapFromState(state *packet.ShellState) map[string]*DeclareDeclType
func DeclsEqual ¶
func DeclsEqual(compareName bool, d1 *DeclareDeclType, d2 *DeclareDeclType) bool
func DumpVarMapFromState ¶
func DumpVarMapFromState(state *packet.ShellState)
func EnvMapFromState ¶
func EnvMapFromState(state *packet.ShellState) map[string]string
func RemoveFunc ¶
func SerializeDeclMap ¶
func SerializeDeclMap(declMap map[string]*DeclareDeclType) []byte
func ShellStateVarsToMap ¶
func ShellVarMapFromState ¶
func ShellVarMapFromState(state *packet.ShellState) map[string]string
func StrMapToShellStateVars ¶
Types ¶
type DeclareDeclType ¶
type DeclareDeclType struct { IsZshDecl bool IsExtVar bool // set for "special" wave internal variables Args string Name string // this holds the raw quoted value suitable for bash. this is *not* the real expanded variable value Value string // special fields for zsh "-T" output. // for bound scalars, "Value" hold everything after the "=" (including the separator character) ZshBoundScalar string // the name of the "scalar" env variable ZshEnvValue string // unlike Value this *is* the expanded value of scalar env variable }
func FindVarDecl ¶
func FindVarDecl(decls []*DeclareDeclType, name string) *DeclareDeclType
func VarDeclsFromState ¶
func VarDeclsFromState(state *packet.ShellState) []*DeclareDeclType
func (*DeclareDeclType) AddFlag ¶
func (d *DeclareDeclType) AddFlag(flag string)
func (*DeclareDeclType) DataType ¶
func (d *DeclareDeclType) DataType() string
func (*DeclareDeclType) IsArray ¶
func (d *DeclareDeclType) IsArray() bool
func (*DeclareDeclType) IsAssocArray ¶
func (d *DeclareDeclType) IsAssocArray() bool
func (*DeclareDeclType) IsExport ¶
func (d *DeclareDeclType) IsExport() bool
func (*DeclareDeclType) IsReadOnly ¶
func (d *DeclareDeclType) IsReadOnly() bool
func (*DeclareDeclType) IsUniqueArray ¶
func (d *DeclareDeclType) IsUniqueArray() bool
func (*DeclareDeclType) IsZshScalarBound ¶
func (d *DeclareDeclType) IsZshScalarBound() bool
func (*DeclareDeclType) Serialize ¶
func (d *DeclareDeclType) Serialize() []byte
NOTE Serialize no longer writes the final null byte
func (*DeclareDeclType) SortZshFlags ¶
func (d *DeclareDeclType) SortZshFlags()
func (*DeclareDeclType) UnescapedValue ¶
func (d *DeclareDeclType) UnescapedValue() string
Click to show internal directories.
Click to hide internal directories.