Skip to content

feat: handle standard input "-"#257

Merged
sharkdp merged 3 commits intosharkdp:masterfrom
Its-Just-Nans:handle-stander-input
Feb 14, 2026
Merged

feat: handle standard input "-"#257
sharkdp merged 3 commits intosharkdp:masterfrom
Its-Just-Nans:handle-stander-input

Conversation

@Its-Just-Nans
Copy link
Copy Markdown
Contributor

@Its-Just-Nans Its-Just-Nans commented Feb 6, 2026

feat: handle standard input "-" and remove a unwrap()

$ echo 1 | cargo run -- -
┌────────┬─────────────────────────┬─────────────────────────┬────────┬────────┐
│00000000│ 31 0a                   ┊                         │1_      ┊        │
└────────┴─────────────────────────┴─────────────────────────┴────────┴────────┘

$ echo -n 1 | cargo run -- -
┌────────┬─────────────────────────┬─────────────────────────┬────────┬────────┐
│00000000│ 31                      ┊                         │1       ┊        │
└────────┴─────────────────────────┴─────────────────────────┴────────┴────────┘

$ echo 1 | cargo run -- -i -
unsigned char stdin[] = {
  0x31, 0x0a
};
unsigned int stdin_len = 2;

@Its-Just-Nans
Copy link
Copy Markdown
Contributor Author

CI is broken, see #256

@sharkdp sharkdp closed this Feb 14, 2026
@sharkdp sharkdp reopened this Feb 14, 2026
@sharkdp sharkdp merged commit 04d74ba into sharkdp:master Feb 14, 2026
27 of 28 checks passed
@sharkdp
Copy link
Copy Markdown
Owner

sharkdp commented Feb 14, 2026

Thank you!

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

Successfully merging this pull request may close these issues.

2 participants