Repository navigation
Add --cli: print the scanned tree to standard output - #85
Open
armada45-pixel wants to merge 1 commit into
Open
armada45-pixel wants to merge 1 commit into
armada45-pixel wants to merge 1 commit into
Conversation
For a caller that can only read output: an agent, an SSH session, a script. The scan is the window's own; `report::text_tree` prints it largest first, each row with its share of its parent, `--depth` levels deep. A directory the depth limit stops at ends in an ellipsis instead of reading as empty, the tail past the 96 children the mosaic keeps shares one row, and a name with a control character is escaped so it stays on its row. A closed pipe is the reader having had enough, not an error. Closes tobi#74 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #74, to the shape proposed there.
disktree --cli [--depth N] [PATH]scans through the existing pipeline and prints the tree instead of opening a window:/.--depthis how many levels print. A directory the limit stops at ends in…rather than reading as empty.report::CHILDREN_KEPT, the same number asLayoutOptions::max_children) the rest share one… N morerow with the summed value.--metric filesranks and prints counts.| head) is not an error; a failed scan exits non-zero.Where it lives
crates/disktree-core/src/report.rsrenders, with its tests beside it;main.rsgains the flag andprint_tree, which returns before any GPUI setup. README has an "In the terminal" section and AGENTS.md's map lists the module.Notes for review
disktree --cli: print the tree to stdout, for agents and headless sessions #74 (@X-SCI-TECH) said there that they have their own implementation and offered a PR. If that one is preferred, close this — it is written to the issue's spec so the two should look alike.read_erroron the tree, not fromScanProgress, because the blockingscandoes not hand its progress back. Unreadable files are therefore not in that number.windows_subsystemprogram that attaches to the parent console; output there and through a pipe both work, but a console on a legacy code page may not draw the box characters.Testing
Windows 11, Rust 1.97.1:
cargo xtask lintgreen,cargo xtask testgreen (69 app, 163 core). Run by hand against this repository, also piped intohead. Not run on Linux or macOS.🤖 Generated with Claude Code