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

feat: Support a full path listing option when using --tree output #416

Closed
fidgetingbits opened this issue Sep 25, 2023 · 8 comments
Closed

Comments

@fidgetingbits
Copy link

First just one to say thanks for forking exa and trying to maintain it!

This is just me mirroring the original exa request posted here ogham/exa#754. I'd like to move to using eza --tree to replace my use of tree, since the tree utility doesn't support honoring .gitignore, etc. However, I regularly rely on the tree -f option to be able to easily access the full path of the underlying files after I find what I need.

For context:

❯ tree --help
usage: tree [-acdfghilnpqrstuvxACDFJQNSUX] [-L level [-R]] [-H  baseHREF]
        [-T title] [-o filename] [-P pattern] [-I pattern] [--gitignore]
        [--gitfile[=]file] [--matchdirs] [--metafirst] [--ignore-case]
        [--nolinks] [--hintro[=]file] [--houtro[=]file] [--inodes] [--device]
        [--sort[=]<name>] [--dirsfirst] [--filesfirst] [--filelimit #] [--si]
        [--du] [--prune] [--charset[=]X] [--timefmt[=]format] [--fromfile]
        [--fromtabfile] [--fflinks] [--info] [--infofile[=]file] [--noreport]
        [--version] [--help] [--] [directory ...]
  ------- Listing options -------
  -a            All files are listed.
  -d            List directories only.
  -l            Follow symbolic links like directories.
  -f            Print the full path prefix for each file.

Usage output:

❯ tree -f foo
foo
├── foo/a
└── foo/bar
    ├── foo/bar/b
    └── foo/bar/bas
        ├── foo/bar/bas/baz
        │   └── foo/bar/bas/baz/d
        └── foo/bar/bas/c

4 directories, 4 files
@fidgetingbits fidgetingbits changed the title feat: Support a full path listing option --tree output feat: Support a full path listing option when using --tree output Sep 25, 2023
@ariasuni
Copy link
Contributor

If we display the absolute path, I believe the tree may be redundant, and we could format the output like so:

foo
foo/a
foo/bar
foo/bar/b
foo/bar/bas
foo/bar/bas/baz
foo/bar/bas/baz/d
foo/bar/bas/c

It would avoid very long lines and with the color I believe it could be quite readable.

@fidgetingbits
Copy link
Author

That also seems reasonable to me

@cafkafk
Copy link
Member

cafkafk commented Sep 27, 2023

this reminds me very much of fd, should we even do this when fd already exists?

@fidgetingbits
Copy link
Author

Ah right that's exactly what fd does and it also honors .gitignore. I can just live with using that instead then. I've been trying to think about some case where having the actual tree visualization helps, but after driving fd for a bunch today I can't think of anything. Happy to just close this then, unless someone thinks of some other benefit.

@MartinFillon
Copy link
Contributor

Well I am closing this but if anyone want to talk about this we can just reopen it

@cafkafk
Copy link
Member

cafkafk commented Oct 1, 2023

@MartinFillon you can also set it as not planned for now, that makes it feel more like we're not doing it immediately, but makes it easier to search for later if we ever run out (probably wont but you know)

@MartinFillon
Copy link
Contributor

We don't have a not planned tag

@cafkafk
Copy link
Member

cafkafk commented Oct 1, 2023

ohh I meant like this

@cafkafk cafkafk closed this as not planned Won't fix, can't repro, duplicate, stale Oct 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants