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

Add a --fix-name-length option to align command output #417

Open
syabro opened this issue Apr 8, 2023 · 2 comments
Open

Add a --fix-name-length option to align command output #417

syabro opened this issue Apr 8, 2023 · 2 comments

Comments

@syabro
Copy link

syabro commented Apr 8, 2023

When using concurrently, providing custom names with the -n or --names option can cause output to become misaligned and difficult to read if the names have different lengths. This can be particularly problematic when the output is lengthy and spans multiple lines.

To address this issue, I propose adding a new --fix-name-length option that allows users to specify a fixed length for the command names. When this option is used, the command names will be padded with spaces or truncated as necessary to ensure that they all have the same length, and the output will be properly aligned.

For example, if a user runs the following command:

concurrently -n "API, TypeScript, VeryLong" --fix-name-length\
    "npm run api" "npm run typescript" "npm run somethingverylong"

The output would be aligned like this:

API        | output from npm run api
TypeScript | output from npm run typescript
VeryLong   | output from npm run somethingverylong

This would make it much easier to read and understand the output from each command, especially in cases where the output spans multiple lines.

I believe that adding a --fix-name-length option would be a valuable addition to concurrently, as it would improve the user experience for those who use custom names for their commands.

@gustavohenke
Copy link
Member

I like this idea very much!

With one caveat: maybe it should just be --pad-names? Or something else that alludes to "padding"?
I feel like "fix" can seem like a bug is involved 😛

@syabro
Copy link
Author

syabro commented Apr 10, 2023

@gustavohenke sure!
--pad-names without any params would be great!

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

No branches or pull requests

2 participants