Elide output for huge amount of files

#83 · closed · 4 comments

View on GitHub ↗

ghyatzo

I tried FileTree on a folder that contains thousands of files. It then print every single one, which seems a bit wasteful. Of course one could elide the output with `;` but sometimes I still want to inspect the whole tree. I think it would make sense to elide most of the output after N subsequent entries have a distance smaller than a certain threshold. Similar to how big arrays are showed.

Comments

DrChainsaw

Yeah, this sounds like a good feature. I hope [AbstractTrees](https://github.com/JuliaCollections/AbstractTrees.jl) (which does the printing among other things) has something built in for this as I'm a bit afraid to tackle this myself (e.g. "issue 34673: Output looks weird in a Pluto notebook"). I'll try to look it up, but please help out if you have the bandwidth.

ghyatzo

At the moment unfortunately I don't have much bandwidth available. Come april things will clear up a bit hopefully and I'll try to help out! Thanks! EDIT: there's seem to be an issue there already about this: https://github.com/JuliaCollections/AbstractTrees.jl/issues/144

ghyatzo

had a free afternoon in the end. filed a PR to upstream. https://github.com/JuliaCollections/AbstractTrees.jl/pull/163

DrChainsaw

PR does not seem to be merged, but I just saw my Julia 1.12.6 session truncate the output of a very large FileTree, so maybe this is fixed in some other way. Please reopen if not.