Handler is the handler interface. Bind binds a key sequence to an action for the current keymap. Do handles $constructs. Get gets the value. ReadFile reads a file. Set sets the value.
*Config
func Parse(r io.Reader, h Handler, opts ...Option) error
func ParseBytes(buf []byte, h Handler, opts ...Option) error
func ParseFile(name string, h Handler, opts ...Option) error
func (*Parser).Parse(stream io.Reader, handler Handler) error
ParseError is a parse error.ErrerrorLineintNamestringTextstring Error satisfies the error interface. Unwrap satisfies the errors.Unwrap call.
*ParseError : error
*ParseError : golang.org/x/xerrors.Wrapper
Parser is a inputrc parser. Errs returns the parse errors encountered. Parse parses inputrc data from the reader, passing sets and binding keys to
h based on the configured options.
func New(opts ...Option) *Parser
Package-Level Functions (total 25)
Decontrol decodes a Control-c code.
DefaultBinds are the default readline bind keymaps.
see: INPUTRC=/dev/null bash -c 'bind -pm <keymap>'
DefaultVars are the default readline vars.
see: INPUTRC=/dev/null bash -c 'bind -v'
Demeta decodes a Meta-c code.
Encontrol encodes a Control-c code.
Enmeta encodes a Meta-c code.
Escape escapes a inputrc string.
EscapeMacro escapes a inputrc macro.
IsControl returns true when c is a Control-c code.
IsMeta returns true when c is a Meta-c code.
New creates a new inputrc parser.
NewConfig creates a new inputrc config.
NewDefaultConfig creates a new inputrc config with default values.
Parse parses inputrc data from r.
ParseBytes parses inputrc data from buf.
ParseFile parses inputrc data from a file name.
Unescape unescapes a inputrc string.
UserDefault loads default inputrc settings for the user.
WithApp is a parser option to set the app name.
WithConfigReadFileFunc is a inputrc config option to set the func used
for ReadFile operations.
WithHaltOnErr is a parser option to set halt on every encountered error.
WithMode is a parser option to set the mode name.
WithName is a parser option to set the file name.
WithStrict is a parser option to set strict keymap parsing.
WithTerm is a parser option to set the term name.
Package-Level Constants (total 20)
Keys.
Keys.
Keys.
Keys.
ErrBindMissingClosingQuote is the bind missing closing quote error.
ErrElseWithoutMatchingIf is the $else without matching $if error.
ErrEndifWithoutMatchingIf is the $endif without matching $if error.
ErrInvalidEditingMode is the invalid editing mode error.
ErrInvalidKeymap is the invalid keymap error.
ErrMacroMissingClosingQuote is the macro missing closing quote error.
ErrMissingColon is the missing : error.
ErrUnknownModifier is the unknown modifier error.
Keys.
Keys.
Keys.
Keys.
Keys.
Keys.
Keys.
Keys.
The pages are generated with Goldsv0.8.2. (GOOS=linux GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds.