concurrently icon indicating copy to clipboard operation
concurrently copied to clipboard

Support tailing commands

Open goldbergyoni opened this issue 7 years ago • 3 comments

Great work, love this.

I run eslint and testing and npm audit and other quality tasks, and the stdout is overwhelming for one to absorb and understand the status. Could you allow tailing each command for few lines?

When I do it myself using bash - "command | tail -n 5" - then the exit code is always 0 (which is the wrong behaviour of course).

goldbergyoni avatar Jul 19 '18 20:07 goldbergyoni

Hm, that's a great idea!

Can you please provide more input on the following questions:

  • Is the tailing global, per command, or both?
  • Do event logs, like [lint] npm run lint exited with code 0, count towards the maximum number of lines?
  • How should processes that get restarted (--allow-restart/--restart-tries) behave?

gustavohenke avatar Aug 13 '18 05:08 gustavohenke

Per command.

.Start simple, then enrich: 1st version will just output the last n lines of each process run (=each restart will show additional n lines). Then once it's ready, let's see what enhancements people are asking for

Consider a CI spin-off of your project where we constantly run quality tasks (lint, license check, test, etc) and show only meaningful notice to the developers

goldbergyoni avatar Aug 20 '18 06:08 goldbergyoni

workaround:

$ printf "a\nb\nc\nd\ne\nf"
a
b
c
d
e
f
$ printf "a\nb\nc\nd\ne\nf" | tail -n4
c
d
e
f
$ node bin/concurrently.js "bash -c \"printf \\\"a\nb\nc\nd\ne\nf\\\" | tail -n4\""
[0] c
[0] d
[0] e
fbash -c "printf \"a\nb\nc\nd\ne\nf\" | tail -n4" exited with code 0

milahu avatar May 08 '21 06:05 milahu