[GH-ISSUE #230] How can I remove space at the first character #105

Closed
opened 2026-06-08 11:25:42 +03:00 by zhus · 4 comments
Owner

Originally created by @avatar-lavventura on GitHub (Jul 31, 2022).
Original GitHub issue: https://github.com/bootandy/dust/issues/230

When I run dust example output is as follows:

 4.0K   ┌── README.org                     │                                                                                                                                                              █ │   0%
 4.0K   ├── job.yaml                       │                                                                                                                                                              █ │   0%
 4.0K   ├── job_example.yaml               │                                                                                                                                                              █ │   0%
 4.0K   ├── job_with_data.yaml             │                                                                                                                                                              █ │   0%
 4.0K   ├── sample_file.txt                │
^
|_ there is space

Instead can I remove the space at each line as:

4.0K   ┌── README.org                     │                                                                                                                                                              █ │   0%
4.0K   ├── job.yaml                       │                                                                                                                                                              █ │   0%
4.0K   ├── job_example.yaml               │                                                                                                                                                              █ │   0%
4.0K   ├── job_with_data.yaml             │                                                                                                                                                              █ │   0%
4.0K   ├── sample_file.txt                │
Originally created by @avatar-lavventura on GitHub (Jul 31, 2022). Original GitHub issue: https://github.com/bootandy/dust/issues/230 When I run `dust` example output is as follows: ```bash 4.0K ┌── README.org │ █ │ 0% 4.0K ├── job.yaml │ █ │ 0% 4.0K ├── job_example.yaml │ █ │ 0% 4.0K ├── job_with_data.yaml │ █ │ 0% 4.0K ├── sample_file.txt │ ^ |_ there is space ``` Instead can I remove the space at each line as: ```bash 4.0K ┌── README.org │ █ │ 0% 4.0K ├── job.yaml │ █ │ 0% 4.0K ├── job_example.yaml │ █ │ 0% 4.0K ├── job_with_data.yaml │ █ │ 0% 4.0K ├── sample_file.txt │ ```
zhus closed this issue 2026-06-08 11:25:42 +03:00
Author
Owner

@bootandy commented on GitHub (Aug 8, 2022):

There isn't an option to do that.

I suppose we could remove that first space.

The space is there because I wanted to handle strings like "1023K" (ie just below 1M). We could remove the space but then how would you handle the case where we need to print 1023K ?

<!-- gh-comment-id:1207820686 --> @bootandy commented on GitHub (Aug 8, 2022): There isn't an option to do that. I suppose we could remove that first space. The space is there because I wanted to handle strings like "1023K" (ie just below 1M). We could remove the space but then how would you handle the case where we need to print 1023K ?
Author
Owner

@avatar-lavventura commented on GitHub (Aug 8, 2022):

Maybe we could remova space if there is no 1023K (4 digit file sizes)?

<!-- gh-comment-id:1207823067 --> @avatar-lavventura commented on GitHub (Aug 8, 2022): Maybe we could remova space if there is no `1023K` (4 digit file sizes)?
Author
Owner

@bootandy commented on GitHub (Aug 8, 2022):

Yes that would be an option. I can look at doing that. I suspect I did it this way for simplicity originally.

(An alternative could be to show 1023K as 0.9M but I don't like this idea.)

<!-- gh-comment-id:1207989865 --> @bootandy commented on GitHub (Aug 8, 2022): Yes that would be an option. I can look at doing that. I suspect I did it this way for simplicity originally. (An alternative could be to show 1023K as 0.9M but I don't like this idea.)
Author
Owner

@bootandy commented on GitHub (Aug 19, 2022):

This was easier to do than expected.

<!-- gh-comment-id:1220473837 --> @bootandy commented on GitHub (Aug 19, 2022): This was easier to do than expected.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: bootandy/archived-dust#105