Problem statement
Running stringy on a real binary with no flags dumps every extracted string to the terminal. On a debug build of stringy itself:
target/debug/stringy target/debug/stringy # prints 47,820 rows
The whole premise of the tool is "meaningful strings, ranked" -- but the default behavior buries that behind tens of thousands of lines. A user's first-ever run floods their scrollback and undersells the ranking that already exists internally.
Proposed solution
Apply a sensible default output bound when --top/--raw are not specified. Options:
- Default
--top to a reasonable N (e.g. 100-200) for TTY output, and print a footer like ... 47,620 more (use --top N or --raw for all).
- Consider making the cap TTY-aware: bounded when stdout is a terminal, unbounded when piped (so
| grep, | jq still see everything). This mirrors how pagers/git behave.
Touches: pipeline (filtering/limit), main.rs (default value + TTY check), output (footer line).
Alternatives considered
- Keep unbounded default, rely on users to pipe to
head/less: poor first-run UX; the tool should be usable without knowing the flags.
- Always cap regardless of piping: breaks
| jq/| grep pipelines that need the full set.
Area
Pipeline / CLI
Problem statement
Running
stringyon a real binary with no flags dumps every extracted string to the terminal. On a debug build of stringy itself:The whole premise of the tool is "meaningful strings, ranked" -- but the default behavior buries that behind tens of thousands of lines. A user's first-ever run floods their scrollback and undersells the ranking that already exists internally.
Proposed solution
Apply a sensible default output bound when
--top/--raware not specified. Options:--topto a reasonable N (e.g. 100-200) for TTY output, and print a footer like... 47,620 more (use --top N or --raw for all).| grep,| jqstill see everything). This mirrors how pagers/gitbehave.Touches:
pipeline(filtering/limit),main.rs(default value + TTY check),output(footer line).Alternatives considered
head/less: poor first-run UX; the tool should be usable without knowing the flags.| jq/| greppipelines that need the full set.Area
Pipeline / CLI