···111111 return nil
112112}
113113114114-// Stop stops the command and cleans up resources
115114func (p *CommandProcess) Stop() {
116116- p.cancel()
117117- if p.cmd != nil && p.cmd.Process != nil {
118118- p.cmd.Process.Kill()
115115+ if p.cmd == nil || p.cmd.Process == nil {
116116+ return
119117 }
118118+119119+ p.cancel()
120120}
121121122122// CheckStatus returns the process state if available
···132132 stdio []IoLine
133133134134 messages []CompilerMessage
135135- fs Fs
136136- w *fsnotify.Watcher
137137- config Config
135135+ extra []string // whatever was not parsed from the compiler output
136136+137137+ fs Fs
138138+ w *fsnotify.Watcher
139139+ config Config
138140139141 status Status
140142 systemErrors []error
···291293 Line: msg.line,
292294 Seq: msg.seq,
293295 })
294294- messages := Parse(m.stderr())
296296+ messages, extra := Parse(m.stderr())
295297 fs := Fs{}
296298 if !m.config.Summarized {
297299 fs = BuildFs(messages)
298300 fs.PopulateContext(messages, m.config.Context)
299301 }
300302 m.messages = messages
303303+ m.extra = extra
301304 m.fs = fs
302305 return m, m.checkStderr()
303306 case processState:
···380383 // Reset state
381384 m.stdio = []IoLine{}
382385 m.messages = nil
386386+ m.extra = nil
383387 m.fs = nil
384388385389 // Create new process
+5-2
parse.go
···2828 Column string
2929}
30303131-func Parse(output string) []CompilerMessage {
3131+func Parse(output string) ([]CompilerMessage, []string) {
3232 var messages []CompilerMessage
3333 var currentMultilineMsg *CompilerMessage
3434+ var extra []string
34353536 scanner := bufio.NewScanner(strings.NewReader(output))
3637 for scanner.Scan() {
···4142 }
42434344 if strings.HasPrefix(line, "#") {
4545+ extra = append(extra, line)
4446 continue
4547 }
46484749 if strings.Contains(line, "panic:") {
5050+ extra = append(extra, line)
4851 continue
4952 }
5053···131134 }
132135 }
133136134134- return messages
137137+ return messages, extra
135138}
136139137140func determineType(message string) string {
+3-7
readme.md
···99- useful error reporting: errors can be expanded/contracted,
1010 they are sorted by priority, natively paged etc.
1111- good defaults: replacing `go ...` commands
1212- with `gust ...` should be enough to get started
1212+ with `gust ...` should be sufficient to get started
1313- highly configurable UI, commands, keybinds etc.
14141515## gallery
16161717-
1818-1919-
2020-2121-
2222-1717+
23182419## todo
25202121+- documentation
2622- support for `go test`
2723- live config reload
+14-6
view.go
···3737 b.WriteString(m.viewRun())
3838 }
39394040+ for _, o := range m.extra {
4141+ b.WriteString(style.Error.Render(sign.System))
4242+ b.WriteString(" ")
4343+ b.WriteString(o)
4444+ b.WriteString("\n")
4545+ }
4646+4047 for _, e := range m.systemErrors {
4148 b.WriteString(style.Error.Render(sign.System))
4249 b.WriteString(" ")
···144151145152func (m Model) viewRun() string {
146153 var b strings.Builder
147147- //style := m.config.Styles
148154149155 if m.config.Stream == "stderr" {
150156 b.WriteString(m.stderr())
···271277272278 var rightStatus strings.Builder
273279 rightStatus.WriteString(" ")
274274- if m.config.Stream == "stderr" {
275275- rightStatus.WriteString(style.Stderr.Render("stderr"))
276276- } else {
277277- rightStatus.WriteString(style.Stdout.Render("stdout"))
280280+ if m.config.Mode == "run" {
281281+ if m.config.Stream == "stderr" {
282282+ rightStatus.WriteString(style.Stderr.Render("stderr"))
283283+ } else {
284284+ rightStatus.WriteString(style.Stdout.Render("stdout"))
285285+ }
286286+ rightStatus.WriteString(style.Separator.Render(sign.Separator))
278287 }
279279- rightStatus.WriteString(style.Separator.Render(sign.Separator))
280288 rightStatus.WriteString(fmt.Sprintf("%3.f%%", m.viewport.ScrollPercent()*100))
281289282290 right := rightStatus.String()