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

no file size when use prettybat #74

Open
finalcreator opened this issue Mar 5, 2022 · 3 comments
Open

no file size when use prettybat #74

finalcreator opened this issue Mar 5, 2022 · 3 comments
Labels
awaiting bat Awaiting a change in bat. prettybat Related to the prettybat script.

Comments

@finalcreator
Copy link

$ prettybat index.json [20:27:13]
───────┬───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
│ File: index.json
│ Size: -
───────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
1 │ {
2 │ "schemaVersion": 2,
3 │ "manifests": [
4 │ {
5 │ "mediaType": "application/vnd.oci.image.manifest.v1+json",
6 │ "digest": "sha256:694a0f0e074158fhddaf55e5ddf4220b7271xxe491cacud30815xx4d75363758f",
7 │ "size": 1032,
8 │ "annotations": { "org.opencontainers.image.ref.name": "2.4.44" }
9 │ }
10 │ ]
11 │ }

$ prettybat --version
prettybat 2021.04.06

$ bat --version
bat 0.20.0

@eth-p
Copy link
Owner

eth-p commented Sep 19, 2023

prettybat works by piping data from a formatter to bat. Because of that, it's not possible for bat to know the size of the original file.

There is a --file-name argument to tell bat the name of the original file, but unfortunately, there isn't any equivalent option for the file size. Until that's added, it's not going to be possible to fix this issue.

@eth-p eth-p added awaiting bat Awaiting a change in bat. prettybat Related to the prettybat script. labels Sep 19, 2023
@finalcreator
Copy link
Author

prettybat works by piping data from a formatter to bat. Because of that, it's not possible for bat to know the size of the original file.

There is a --file-name argument to tell bat the name of the original file, but unfortunately, there isn't any equivalent option for the file size. Until that's added, it's not going to be possible to fix this issue.

So "Size: " is meaningless to be show here.

│ File: index.json
│ Size: -

@eth-p
Copy link
Owner

eth-p commented Sep 23, 2023

Pretty much, yes.

What do you have in your bat config file? It doesn't show by default on my setup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting bat Awaiting a change in bat. prettybat Related to the prettybat script.
Projects
None yet
Development

No branches or pull requests

2 participants