{"modulePath":"github.com/wavetermdev/waveterm/waveshell","version":"v0.7.6","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package simpleexpand\n\n## Types\n\n```go\ntype SimpleExpandContext struct {\n\tHomeDir string\n}\n```\n\n```go\ntype SimpleExpandInfo struct {\n\tHasTilde   bool // only ~ as the first character when SimpleExpandContext.HomeDir is set\n\tHasVar     bool // $x, $$, ${...}\n\tHasGlob    bool // *, ?, [, {\n\tHasExtGlob bool // ?(...) ... ?*+@!\n\tHasHistory bool // ! (anywhere)\n\tHasSpecial bool // subshell, arith\n}\n```\n\n```go\nfunc SimpleExpandPartialWord(ectx SimpleExpandContext, partialWord string, multiPart bool) (string, SimpleExpandInfo)\n```\n\n```go\nfunc SimpleExpandWord(ectx SimpleExpandContext, word *syntax.Word, sourceStr string) (string, SimpleExpandInfo)\n```\nsimple word expansion expands: literals, single-quoted strings, double-quoted strings (recursively) does \\*not\\* expand: params (variables), command substitution, arithmetic expressions, process substituions, globs for the not expands, they will show up as the literal string this is different than expand.Literal which will replace variables as empty string if they aren't defined. so \"a\"'foo'${bar}$x =\u003e \"afoo${bar}$x\", but expand.Literal would produce =\u003e \"afoo\" note will do ~ expansion (will not do ~user expansion)\n\n","path":"github.com/wavetermdev/waveterm/waveshell/pkg/simpleexpand","name":"simpleexpand","synopsis":"","isRedistributable":true}
