Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

read input from stdin or fd special file #12

Closed
milahu opened this issue Sep 14, 2022 · 1 comment
Closed

read input from stdin or fd special file #12

milahu opened this issue Sep 14, 2022 · 1 comment

Comments

@milahu
Copy link
Contributor

milahu commented Sep 14, 2022

this should work

$ echo '{}' | nix-editor --val 1 /dev/stdin a
error: reading '/dev/stdin': No such file

$ echo '{}' | nix-editor --val 1 - a
error: reading '-': No such file

$ nix-editor --val 1 <(echo '{}') a
error: reading '/dev/fd/63': No such file

this works with standard CLI tools like cat

$ echo foo | cat /dev/stdin | head -c1
f

$ echo foo | cat - | head -c1
f

$ cat <(echo foo) | head -c1
f
@vlinkz
Copy link
Collaborator

vlinkz commented Sep 15, 2022

Fixed in 188f6f8, thanks :)

@vlinkz vlinkz closed this as completed Sep 15, 2022
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

No branches or pull requests

2 participants