Skip to content
This repository has been archived by the owner on Jun 15, 2019. It is now read-only.

Character align? #12

Open
TuckerWhitehouse opened this issue Jul 29, 2015 · 3 comments
Open

Character align? #12

TuckerWhitehouse opened this issue Jul 29, 2015 · 3 comments

Comments

@TuckerWhitehouse
Copy link

Would it be possible to add support for alignment by character?
Something similar to the "dotted"-align found in https://npmjs.com/package/text-table but more generic.

I've got source line and column information that I would like to display as colon separated.
I believe a use case similar to mine can be seen here https://github.com/feross/snazzy.

@jamestalmage
Copy link
Owner

I'm not sure what you're asking for.
Do you want just no outline?

https://github.com/jamestalmage/cli-table2#custom-styles

@TuckerWhitehouse
Copy link
Author

I'm looking for the contents of a column to be aligned based on a character in that string.
text-table offers a "dotted" alignment where a column's values are all aligned based on the "." (such as numbers) https://www.npmjs.com/package/text-table#dotted-align

See how the contents of the first column are aligned by the ":"?
┌────────────────────────────────────────────────┐
│ /Users/Tucker/Project/js/main.js               │
├──────────┬───────┬─────────────────────────────┤
│    2:0   │ error │ There was some error        │
├──────────┼───────┼─────────────────────────────┤
│ 3864:12  │ error │ There was some extremely    │
│          │       │ long and detailed error     │
├──────────┼───────┼─────────────────────────────┤
│    2:10  │ alert │ Alert found!                │
├──────────┼───────┼─────────────────────────────┤
│   32:0   │       │ Nothing to see here         │
└──────────┴───────┴─────────────────────────────┘

@jamestalmage
Copy link
Owner

Ah, I get it.
Yes, good feature request.

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

No branches or pull requests

2 participants