]> git.lizzy.rs Git - micro.git/blobdiff - cmd/micro/messenger.go
Add cd and pwd commands to change the working dir
[micro.git] / cmd / micro / messenger.go
index a9535b35ca2277f17512fa3a3c85ef18be3052dd..d031ba83a5d7b7e3f7e160acad1c2f34c54db8da 100644 (file)
@@ -21,10 +21,10 @@ func TermMessage(msg ...interface{}) {
        screenWasNil := screen == nil
        if !screenWasNil {
                screen.Fini()
+               screen = nil
        }
 
        fmt.Println(msg...)
-       messenger.AddLog(fmt.Sprint(msg...))
        fmt.Print("\nPress enter to continue")
 
        reader := bufio.NewReader(os.Stdin)
@@ -192,6 +192,8 @@ const (
        CommandCompletion
        HelpCompletion
        OptionCompletion
+       PluginCmdCompletion
+       PluginNameCompletion
 )
 
 // Prompt sends the user a message and waits for a response to be typed in
@@ -255,6 +257,10 @@ func (m *Messenger) Prompt(prompt, historyType string, completionTypes ...Comple
                                        chosen, suggestions = HelpComplete(currentArg)
                                } else if completionType == OptionCompletion {
                                        chosen, suggestions = OptionComplete(currentArg)
+                               } else if completionType == PluginCmdCompletion {
+                                       chosen, suggestions = PluginCmdComplete(currentArg)
+                               } else if completionType == PluginNameCompletion {
+                                       chosen, suggestions = PluginNameComplete(currentArg)
                                } else if completionType < NoCompletion {
                                        chosen, suggestions = PluginComplete(completionType, currentArg)
                                }