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

Don't display file byte counts with thousands separator #554

Closed
bknowles opened this issue Jul 31, 2019 · 2 comments
Closed

Don't display file byte counts with thousands separator #554

bknowles opened this issue Jul 31, 2019 · 2 comments
Labels
X › wontfix Not-bugs, or intended features

Comments

@bknowles
Copy link

Folks,

When using the -B option with exa -l, the output will include actual byte counts for each file in question, but those byte counts will include a thousands separator. This is inconsistent with the behaviour of /bin/ls when providing byte counts, and would require that a developer using this command as part of a pipeline will need to be able to detect the thousands separator and remove it, if they are going to try to do any calculations on this number.

I understand the desire to be able to display a large number with a thousands separator, but I do not believe that this should be the default in this case.

Of course, I'm assuming that if you do provide a thousands separator, that this is language and locale appropriate, so while we might see a comma here in the US, other places might see a simple space character or a period or some other character that the language/locale specifies as the thousands separator.

@ogham
Copy link
Owner

ogham commented Apr 4, 2021

Of course, I'm assuming that if you do provide a thousands separator, that this is language and locale appropriate, so while we might see a comma here in the US, other places might see a simple space character or a period or some other character that the language/locale specifies as the thousands separator.

It does indeed go through the locale routines.

I'm going to defer this issue to the very old feature request #13, which is to provide some sort of structured output, which will probably be JSON. Tools like exa and ls certainly look almost-machine-parseable, but having them be fully machine-parseable is not a road I want to go down without an explicit flag to enable this mode.

@ogham ogham closed this as completed Apr 4, 2021
@ogham ogham added the X › wontfix Not-bugs, or intended features label Apr 4, 2021
@themadsens
Copy link

The thousand sep behaviour is extremely obnoxious when cutting/pasting into calculations.
Please consider a flag to control this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
X › wontfix Not-bugs, or intended features
Projects
None yet
Development

No branches or pull requests

3 participants