Better folder structure display #100

Closed
opened 2020-09-16 21:41:22 +03:00 by oblitum · 3 comments

Currently I'm seeing an indentation of one whitespace for folder structure. I wish to have at least two spaces, or that it was configurable, or even nicer, have asciiart for the folder tree.

Currently I'm seeing an indentation of one whitespace for folder structure. I wish to have at least two spaces, or that it was configurable, or even nicer, have asciiart for the folder tree.

That was easy to implement, rendered doc from the manpage:

   Examples of sidebar mailbox tree customization
     The default values


      has_sibling = " "
      no_sibling = " ";
      has_sibling_leaf = " "
      no_sibling_leaf = " "

     render a mailbox tree like the following:


     0  Inbox 3
     1   Archive
     2   Drafts
     3   Lists
     4    example-list-a
     5    example-list-b
     6   Sent
     7   Spam
     8   Trash

     Other possible trees:


     has_sibling = " ┃"
     no_sibling = "  "
     has_sibling_leaf = " ┣━"
     no_sibling_leaf = " ┗━"


     0  Inbox 3
     1   ┣━Archive
     2   ┣━Drafts
     3   ┣━Lists
     4   ┃ ┣━example-list-a
     5   ┃ ┗━example-list-b
     6   ┣━Sent
     7   ┣━Spam
     8   ┗━Trash

     A completely ASCII one:


     has_sibling = " |"
     no_sibling = "  "
     has_sibling_leaf = " |\_"
     no_sibling_leaf = " \_"


     0  Inbox 3
     1   |\_Archive
     2   |\_Drafts
     3   |\_Lists
     4   | |\_example-list-a
     5   |  \_example-list-b
     6   |\_Sent
     7   |\_Spam
     8    \_Trash

Is this what you had in mind?

That was easy to implement, rendered doc from the manpage: ```text Examples of sidebar mailbox tree customization The default values has_sibling = " " no_sibling = " "; has_sibling_leaf = " " no_sibling_leaf = " " render a mailbox tree like the following: 0 Inbox 3 1 Archive 2 Drafts 3 Lists 4 example-list-a 5 example-list-b 6 Sent 7 Spam 8 Trash Other possible trees: has_sibling = " ┃" no_sibling = " " has_sibling_leaf = " ┣━" no_sibling_leaf = " ┗━" 0 Inbox 3 1 ┣━Archive 2 ┣━Drafts 3 ┣━Lists 4 ┃ ┣━example-list-a 5 ┃ ┗━example-list-b 6 ┣━Sent 7 ┣━Spam 8 ┗━Trash A completely ASCII one: has_sibling = " |" no_sibling = " " has_sibling_leaf = " |\_" no_sibling_leaf = " \_" 0 Inbox 3 1 |\_Archive 2 |\_Drafts 3 |\_Lists 4 | |\_example-list-a 5 | \_example-list-b 6 |\_Sent 7 |\_Spam 8 \_Trash ``` Is this what you had in mind?
Manos Pitsidianakis added the
enhancement
label 2020-09-17 16:52:47 +03:00

Here's another ascii one:

0  INBOX
1   +-Drafts
2   +-Lists
3   | +-list-a
4   |  +-list-b
5   +-Sent
6   +-Trash
7   +-Junk
Here's another ascii one: ```text 0 INBOX 1 +-Drafts 2 +-Lists 3 | +-list-a 4 | +-list-b 5 +-Sent 6 +-Trash 7 +-Junk ```

Thanks, nicely done and flexible.

Thanks, nicely done and flexible.
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: meli/meli#100
There is no content yet.