You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Feature request: Prefix output with (colored?) indicator of which process it came from #46
After having used docker-compose in the past, I really liked the way it showed output from all of the processes it runs. Here's a screenshot:
It would be nice if parallelshell allowed me to specify a "name" for each process and automatically choose a different color for each prefix. If a name was not given, it would fall back to using the name of the command that was run.
The npm package "concurrently" offers something similar, but the prefixes are not colored and the package itself does not handle colored output well in general.
I'd be happy to work on a pull request if this is something that would be useful!
currently the color of the child processes are passed through
to color the output within parallelshell, we would need to buffer it, but then the color information of the children would get lost.
There could be a flag to switch between the both modes, but what really bothers me is how you want to pass the information which process gets which color ?
Hey! This is now in 4.0.0 🎉 Use -p (or --prefix) to label every line with its command, or put -l name before a command to name it:
parallelshell -l api "node server.js" -l web "npm run watch"
npm scripts get their script name as the label and labels are colored like docker compose when the output is a terminal. Commands also get FORCE_COLOR so their own colors stay on. It took a while but thanks for the idea! Feel free to reopen if something looks off 😊
Activity
paulpflug commentedon Feb 16, 2016
currently the color of the child processes are passed through
to color the output within parallelshell, we would need to buffer it, but then the color information of the children would get lost.
There could be a flag to switch between the both modes, but what really bothers me is how you want to pass the information which process gets which color ?
darkguy2008 commentedon Oct 1, 2026
Hey! This is now in 4.0.0 🎉 Use
-p(or--prefix) to label every line with its command, or put-l namebefore a command to name it:npm scripts get their script name as the label and labels are colored like docker compose when the output is a terminal. Commands also get
FORCE_COLORso their own colors stay on. It took a while but thanks for the idea! Feel free to reopen if something looks off 😊