ctrlret: replaced return types of controllers from tea.Cmd to tea.Msg
This dramatically cuts downs the number of closures.
This commit is contained in:
parent
931b11cd0d
commit
5b6bf1f0ae
17 changed files with 472 additions and 562 deletions
|
|
@ -50,7 +50,7 @@ func main() {
|
|||
cmdController := commandctrl.NewCommandController()
|
||||
cmdController.AddCommands(&commandctrl.CommandContext{
|
||||
Commands: map[string]commandctrl.Command{
|
||||
"cd": func(args []string) tea.Cmd {
|
||||
"cd": func(args []string) tea.Msg {
|
||||
return ctrl.ChangePrefix(args[0])
|
||||
},
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue