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

Add a tree viewer to display hierarchies in tree format #12850

Open
naiyerasif opened this issue May 12, 2024 · 2 comments
Open

Add a tree viewer to display hierarchies in tree format #12850

naiyerasif opened this issue May 12, 2024 · 2 comments
Labels
enhancement New feature or request needs-triage An issue that hasn't had any proper look

Comments

@naiyerasif
Copy link

naiyerasif commented May 12, 2024

Related problem

There are many instances where I'm interested in viewing the hierarchies, for example,

  • folder hierarchy (particularly when I'm doing ls **/*)
  • object hierarchy while viewing large XML, JSON files, etc

Describe the solution you'd like

For example, for ls **/* | where type == dir | tree --level 1, I'd like to see a hierarchy of directories at the depth 1.

.
├── drafts
├── templates
╰── workspaces

Similarly, for an application.yml containing the following configuration

management:
  endpoints.web.exposure.include: health,info
  endpoint.info.enabled: true
  info.env.enabled: true

info:
  app.version: 1.0.0
  java.version: 22

open application.yml | tree can display the hierarchy as follows.

.
├── management
│  ├── endpoints
│  │  ╰── web
│  │     ╰── exposure
│  │        ╰── include
│  ├── endpoint
│  │  ╰── info
│  │     ╰── enabled
│  ╰── info
│     ╰── env
│        ╰── enabled
╰── info
   ├── app
   │  ╰── version
   ╰── java
      ╰── version

Describe alternatives you've considered

For files hierarchies, eza provides a nice tree view but for viewing the hierarchies of different file types, I've hacked together some scripts. Those scripts get the job done but are a pain to maintain because of underlying dependencies.

Additional context and details

No response

@naiyerasif naiyerasif added enhancement New feature or request needs-triage An issue that hasn't had any proper look labels May 12, 2024
@francesco-gaglione
Copy link
Contributor

@naiyerasif if confirmed I can work on this... directions on where to find the tree command in the source code?

@naiyerasif
Copy link
Author

directions on where to find the tree command in the source code

There's no tree command for now (there used by a tree command around v0.4 as far as I can recall but it was removed in later versions).

This issue still needs a triage so let's wait for someone from core contributors check this to determine if it is worth implementing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs-triage An issue that hasn't had any proper look
Projects
None yet
Development

No branches or pull requests

2 participants