Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prefix padding #495

Merged
merged 6 commits into from
Aug 16, 2024
Merged

Prefix padding #495

merged 6 commits into from
Aug 16, 2024

Conversation

gustavohenke
Copy link
Member

@gustavohenke gustavohenke commented Aug 4, 2024

Added a --pad-prefix flag which makes all prefixes the same length, padding shorter ones with spaces.

Example:

$ concurrently -n foo,barbaz --pad-prefix "echo foo" "echo bar"
[foo   ] foo
[foo   ] echo foo exited with code 0
[barbaz] bar
[barbaz] echo bar exited with code 0

Noteworthy:
Although most prefixes have a stable length, PIDs can become longer if the command restarts, e.g. it was originally 9 but after a restart it's 10.
Obviously we can't rewrite the past, so new log entries from that respawn onwards will be padded appropriately.

Closes #166
Closes #417

@gustavohenke gustavohenke added this to the v9 milestone Aug 4, 2024
@coveralls
Copy link

coveralls commented Aug 4, 2024

Coverage Status

coverage: 99.177% (+0.03%) from 99.144%
when pulling 126b571 on prefix-padding
into 23f97ac on main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a --fix-name-length option to align command output Options to make sure names are the same length
2 participants