stdin without pipe
See original GitHub issueI want to feed prettier input from stdin without piping. Other formatters have a -
or --stdin
flag which does the same, or have this behaviour when no arguments are passed.
Environments:
- Prettier Version: 2.7.1
- Running Prettier via: cli
- Runtime: node v16.15.1 from volta
- Operating System: Linux
- Prettier plugins (if any): not relevant
Steps to reproduce:
prettier --stdin-filepath=foo.json -
{"foo":1,"bar":2}
^D
Expected behavior: Writes
{ "foo": 1, "bar": 2 }
to stdout
Actual behavior: Error message
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:8 (2 by maintainers)
Top Results From Across the Web
bash - Send string to stdin - Stack Overflow
Here's a solution that matches all three conditions: /my/bash/script < <(echo 'This string will be sent to stdin.
Read more >Why doesn't piping work for a command that expects stdin?
Is that not equivalent to just piping? Apparently no. No it isn't. Here I try to put the contents of ls into a...
Read more >How does piping affect stdin? - Unix & Linux Stack Exchange
A pipe is a buffer allocated in the kernel with file descriptors associated with the read and write ends. When you run cat...
Read more >linux - Can I send some text to the STDIN of an active process ...
It is possible to send input text to a running process without running the screen ... First create a named pipe to route...
Read more >Bash One-Liners Explained, Part III: All about redirections
This works on bash versions starting 4.0. The |& redirection operator sends both stdout and stderr of command1 over a pipe to stdin...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@artemkovalyov Yes I have. Should raise a PR for this soon. 😉
We can add support for it.