Skip to content

Commit

Permalink
tmp
Browse files Browse the repository at this point in the history
  • Loading branch information
rsteube committed Jul 23, 2023
1 parent 54e626b commit 8a33c0f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion defaultActions.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,11 +211,12 @@ func ActionMessage(msg string, args ...interface{}) Action {
})
}

// ActionMultiParts completes multiple parts of words separately where each part is separated by some char (Context.Value is set to the currently completed part during invocation).
// ActionMultiParts completes parts of c.Value separated by sep.
func ActionMultiParts(sep string, callback func(c Context) Action) Action {
return ActionMultiPartsN(sep, -1, callback)
}

// ActionMultiPartsN is like ActionMultiPartsN but limits the number of parts to `n`.
func ActionMultiPartsN(sep string, n int, callback func(c Context) Action) Action {
return ActionCallback(func(c Context) Action {
splitted := strings.SplitN(c.Value, sep, n)
Expand Down

0 comments on commit 8a33c0f

Please sign in to comment.