Documentation
¶
Index ¶
Constants ¶
View Source
const ( ACK = 6 TAB = 9 LF = 10 CR = 13 US = 31 SPACE = 32 AMPERSTAND = 38 SINGLE_QUOTE = 39 PLUS = 43 NINE = 57 QUESTION = 63 UPPERCASE_Z = 90 OPEN_BRACKET = 91 BACKSLASH = 92 UNDERSCORE = 95 CLOSE_BRACKET = 93 BACKTICK = 96 LOWERCASE_Z = 122 TILDA = 126 DEL = 127 )
nolint
Variables ¶
View Source
var Bash = bash{}
View Source
var Clink = clink{}
View Source
var Nushell = nushell{}
View Source
var Zsh = zsh{}
Functions ¶
func BashEscape ¶
https://github.com/solidsnack/shell-escape/blob/master/Text/ShellEscape/Bash.hs
A Bash escaped string. The strings are wrapped in @$\'...\'@ if any bytes within them must be escaped; otherwise, they are left as is. Newlines and other control characters are represented as ANSI escape sequences. High bytes are represented as hex codes. Thus Bash escaped strings will always fit on one line and never contain non-ASCII bytes.
func PowerShellEscape ¶
Types ¶
type ActivateConfig ¶ added in v0.6.1
type Shell ¶
type Shell interface {
// Activate generates a shell script to be placed in the shell's configuration file, which will set up initial
// environment variables and set a hook to update the environment variables when needed.
Activate(config ActivateConfig) (string, error)
// Export generates a string that can be used by the shell to set or unset the given environment variables. (The
// input specifies environment variables to be unset by giving them a nil value.)
Export(envs env.Vars) string
}
var Fish Shell = fish{}
Fish adds support for the fish shell as a host
var Pwsh Shell = pwsh{}
Pwsh shell instance
Click to show internal directories.
Click to hide internal directories.