mirror of
https://github.com/peco/peco.git
synced 2026-09-10 07:16:29 -04:00
Correct misspellings in documents
This commit is contained in:
parent
d36c492e50
commit
1e9e1886a2
|
|
@ -153,7 +153,7 @@ Specifies the initial line position upon start up. E.g. If you want to start out
|
|||
|
||||
### --initial-filter `IgnoreCase|CaseSensitive|SmartCase|Regexp`
|
||||
|
||||
Specifies the initial fitler to use upon start up. You should specify the name of the filter like `IgnoreCase`, `CaseSensitive`, `SmartCase` and `Regexp`. Default is `IgnoreCase`.
|
||||
Specifies the initial filter to use upon start up. You should specify the name of the filter like `IgnoreCase`, `CaseSensitive`, `SmartCase` and `Regexp`. Default is `IgnoreCase`.
|
||||
|
||||
### --prompt
|
||||
|
||||
|
|
@ -461,7 +461,7 @@ By default `peco` comes with `IgnoreCase`, `CaseSensitive`, `SmartCase` and `Reg
|
|||
The filter will be executed via `Command.Run()` as an external process, and it will be passed the query values in the command line, and the original unaltered buffer is passed via `os.Stdin`. Your filter must perform the matching, and print out to `os.Stdout` matched lines. You filter MAY be called multiple times if the buffer
|
||||
given to peco is big enough. See `BufferThreshold` below.
|
||||
|
||||
Note that currently there is no way for the custom filter to specify where in the line the match occurred, so matched portions in the string WILL NOT BE HIGHLITED.
|
||||
Note that currently there is no way for the custom filter to specify where in the line the match occurred, so matched portions in the string WILL NOT BE HIGHLIGHTED.
|
||||
|
||||
The filter does not need to be a go program. It can be a perl/ruby/python/bash script, or anything else that is executable.
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import (
|
|||
"github.com/peco/peco/keyseq"
|
||||
)
|
||||
|
||||
// ErrUserCanceled is used to ignal that the user deliverately
|
||||
// ErrUserCanceled is used to signal that the user deliberately
|
||||
// canceled using peco
|
||||
var ErrUserCanceled = errors.New("canceled")
|
||||
|
||||
|
|
@ -38,7 +38,7 @@ func (a ActionFunc) Execute(i *Input, e termbox.Event) {
|
|||
a(i, e)
|
||||
}
|
||||
|
||||
// Register fulfills the Actin interface for AfterFunc. Registers `a`
|
||||
// Register fulfills the Action interface for AfterFunc. Registers `a`
|
||||
// into the global action registry by the name `name`, and maps to
|
||||
// default keys via `defaultKeys`
|
||||
func (a ActionFunc) Register(name string, defaultKeys ...termbox.Key) {
|
||||
|
|
@ -48,7 +48,7 @@ func (a ActionFunc) Register(name string, defaultKeys ...termbox.Key) {
|
|||
}
|
||||
}
|
||||
|
||||
// RegisterKeySequence satisfies the Action interface for AfterFun.
|
||||
// RegisterKeySequence satisfies the Action interface for AfterFunc.
|
||||
// Registers the action to be mapped against a key sequence
|
||||
func (a ActionFunc) RegisterKeySequence(k keyseq.KeyList) {
|
||||
defaultKeyBinding[k.String()] = a
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@ type RawLineBuffer struct {
|
|||
simplePipeline
|
||||
buffers dependentBuffers
|
||||
lines []Line
|
||||
capacity int // max numer of lines. 0 means unlimited
|
||||
capacity int // max number of lines. 0 means unlimited
|
||||
onEnd func()
|
||||
}
|
||||
|
||||
|
|
@ -289,4 +289,3 @@ func (flb *FilteredLineBuffer) Register(lb LineBuffer) {
|
|||
func (flb *FilteredLineBuffer) Unregister(lb LineBuffer) {
|
||||
flb.buffers.Unregister(lb)
|
||||
}
|
||||
|
||||
|
|
|
|||
2
cli.go
2
cli.go
|
|
@ -59,7 +59,7 @@ func (o CLIOptions) BufferSize() int {
|
|||
return o.OptBufferSize
|
||||
}
|
||||
|
||||
// EnableNullSep returns tru if --null was specified. Fulfills CtxOptions
|
||||
// EnableNullSep returns true if --null was specified. Fulfills CtxOptions
|
||||
func (o CLIOptions) EnableNullSep() bool {
|
||||
return o.OptEnableNullSep
|
||||
}
|
||||
|
|
|
|||
2
ctx.go
2
ctx.go
|
|
@ -106,7 +106,7 @@ func (q *FilterQuery) InsertQueryAt(ch rune, where int) {
|
|||
}
|
||||
|
||||
// Ctx contains all the important data. while you can easily access
|
||||
// data in this struct from anwyehre, only do so via channels
|
||||
// data in this struct from anywhere, only do so via channels
|
||||
type Ctx struct {
|
||||
*Hub
|
||||
*FilterQuery
|
||||
|
|
|
|||
4
hub.go
4
hub.go
|
|
@ -18,7 +18,7 @@ type Hub struct {
|
|||
pagingCh chan HubReq
|
||||
}
|
||||
|
||||
// HubReq is a wrapper around the actual requst value that needs
|
||||
// HubReq is a wrapper around the actual request value that needs
|
||||
// to be passed. It contains an optional channel field which can
|
||||
// be filled to force synchronous communication between the
|
||||
// sender and receiver
|
||||
|
|
@ -157,7 +157,7 @@ func (h *Hub) SendPaging(x PagingRequest) {
|
|||
send(h.PagingCh(), HubReq{x, nil}, h.isSync)
|
||||
}
|
||||
|
||||
// Stop closes the LoopCh so that peco shutsdown
|
||||
// Stop closes the LoopCh so that peco shutdown
|
||||
func (h *Hub) Stop() {
|
||||
close(h.LoopCh())
|
||||
}
|
||||
|
|
|
|||
|
|
@ -512,7 +512,7 @@ func NewBottomUpLayout(ctx *Ctx) *BasicLayout {
|
|||
// The prompt is at the bottom, above the status bar
|
||||
prompt: NewUserPrompt(ctx, AnchorBottom, 1+extraOffset),
|
||||
// The list area is at the bottom, above the prompt
|
||||
// IT's displayed in bottom-to-top order
|
||||
// It's displayed in bottom-to-top order
|
||||
list: NewListArea(ctx, AnchorBottom, 2+extraOffset, false),
|
||||
}
|
||||
}
|
||||
|
|
|
|||
4
line.go
4
line.go
|
|
@ -56,12 +56,12 @@ type Line interface {
|
|||
|
||||
// Indices return the matched portion(s) of a string after filtering.
|
||||
// Note that while Indices may return nil, that just means that there are
|
||||
// no substrings to be hilighted. It doesn't mean there were no matches
|
||||
// no substrings to be highlighted. It doesn't mean there were no matches
|
||||
Indices() [][]int
|
||||
|
||||
// Output returns the string to be display as peco finishes up doing its
|
||||
// thing. This means if you have null separator, the contents before the
|
||||
// separater are not included in this string
|
||||
// separator are not included in this string
|
||||
Output() string
|
||||
|
||||
// IsDirty returns true if this line should be forcefully redrawn
|
||||
|
|
|
|||
Loading…
Reference in a new issue