Documentation ¶
Index ¶
Constants ¶
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 )
Variables ¶
This section is empty.
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.
Types ¶
type Export ¶
Export represents environment variables to add and remove on the host shell.
type Shell ¶
type Shell interface { // Hook is the string that gets evaluated into the host shell config and // setups direnv as a prompt hook. Hook() string // Export outputs the a string that exports the given environment variables Export(key, value string) string // ExportAll outputs a string that exports all the given environment ExportAll(Export) string // Unset unsets the given key from the host shell Unset(key string) string // Shell returns the name of the shell Shell() string // RCFile returns the path to the RC file RCFile() string }
Shell is the interface that represents the interaction with the host shell.
var Bash Shell = bash{}
Bash shell instance
var Fish Shell = fish{}
Fish adds support for the fish shell as a host
var Zsh Shell = zsh{}
Zsh adds support for the venerable Z shell.