add support for managing the initial buffer content.
the option will modify the buffer content upon startup and works in combination with `OptionShowCompletionAtStart()`.
这个提交包含在:
父节点
3a148d1647
当前提交
715666277d
|
@ -37,6 +37,14 @@ func OptionPrefix(x string) Option {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// OptionInitialBufferText to set the initial buffer text
|
||||||
|
func OptionInitialBufferText(x string) Option {
|
||||||
|
return func(p *Prompt) error {
|
||||||
|
p.buf.InsertText(x, false, true)
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// OptionCompletionWordSeparator to set word separators. Enable only ' ' if empty.
|
// OptionCompletionWordSeparator to set word separators. Enable only ' ' if empty.
|
||||||
func OptionCompletionWordSeparator(x string) Option {
|
func OptionCompletionWordSeparator(x string) Option {
|
||||||
return func(p *Prompt) error {
|
return func(p *Prompt) error {
|
||||||
|
|
正在加载...
在新工单中引用