Skip to content
New issue

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

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

Already on GitHub? # to your account

netcat -q 0 #1

Closed
calebeby opened this issue Aug 24, 2017 · 4 comments
Closed

netcat -q 0 #1

calebeby opened this issue Aug 24, 2017 · 4 comments

Comments

@calebeby
Copy link

Hello,

For me, this script only works if I use nc -q 0 127.0.0.1 ... rather than nc 127.0.0.1 .... If I use this script without the -q 0 flag, it waits and does nothing until I ^C. My understanding is that the -q 0 flag causes the connection to end right away, rather than waiting for the server to close it. I am running arch linux, and have tried both bsd-netcat and gnu-netcat. The same issue applies to eslintme

@josephfrazier
Copy link

Hey @calebeby, prettier_d author here. prettier_d actually comes with a prettier_dnc script that handles this for you (I encountered the same issue and fixed it there). If you install prettier_d globally and then run prettier_d start, you can use it like prettier_dnc < ./path/to/file.js.

The source code also shows how prettierme could determine whether to use -q 0: https://github.com/josephfrazier/prettier_d/blob/6e5689bc04b10b38243ee4975cdb742b49d07f98/bin/prettier_dnc.sh

@calebeby
Copy link
Author

calebeby commented Sep 3, 2017

OK, I'll stick to using pretttier_dnc for now. I'll leave this issue open in case @ruyadorno wants to implement this. Thanks

@ruyadorno
Copy link
Owner

@calebeby thanks for reporting! 😊

@josephfrazier that seems like a smart and easy fix, I'll bring it over to prettierme too, thanks so much for letting me know! 🏆

ruyadorno added a commit that referenced this issue Oct 19, 2017
Fixes linux nc integration, fix #1
@ruyadorno
Copy link
Owner

landed on v3.0.0

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants