mirror of https://github.com/chzyer/readline.git
[completer] add SegmentAutoComplete
This commit is contained in:
parent
de49e7f118
commit
52d8a65723
|
@ -29,6 +29,12 @@ func SegmentFunc(f func([][]rune, int) [][]rune) AutoCompleter {
|
||||||
return &SegmentComplete{&dumpSegmentCompleter{f}}
|
return &SegmentComplete{&dumpSegmentCompleter{f}}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func SegmentAutoComplete(completer SegmentCompleter) *SegmentComplete {
|
||||||
|
return &SegmentComplete{
|
||||||
|
SegmentCompleter: completer,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
type SegmentComplete struct {
|
type SegmentComplete struct {
|
||||||
SegmentCompleter
|
SegmentCompleter
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue