Skip to content

Conversation

@letmutex
Copy link
Owner

As @dbohdan suggested in #2, we should implement stdin as an input, and stdout as an output, and make them default.

This can be confusing for someone with poor CLI experience (me) because if you just type "htmd" it will wait for input and not prompt you anything. But this is how other cli tools on *nix do, this will allow us to interact with other tools, such as grep, cmark, etc.

htmd < hello.html

htmd < hello.html | grep "heading"

cmark < hello.md | htmd

Fs input and output still work the same way, but stdout as the output won't work when your input has multiple files.

@letmutex letmutex linked an issue Jun 22, 2024 that may be closed by this pull request
@letmutex letmutex merged commit 4299af1 into main Jun 22, 2024
@letmutex letmutex deleted the stdin-stdout branch June 22, 2024 00:16
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.

Should read from stdin and write to stdout by default

2 participants