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

Document caveats with BSD netcat vs GNU netcat vs socat etc #19

Closed
NightMachinery opened this issue Oct 31, 2018 · 6 comments
Closed

Document caveats with BSD netcat vs GNU netcat vs socat etc #19

NightMachinery opened this issue Oct 31, 2018 · 6 comments

Comments

@NightMachinery
Copy link

nc has different implementations on different systems. Using gnu nc (which is installable by brew on any system) with the -c flag works best in my experience. This flag may not be present on other implementations or may not work correctly.

@wincent
Copy link
Owner

wincent commented Oct 31, 2018

Platform differences are the main reason the -executable and -flags arguments are provided, so that people can make Clipper work on arbitrary systems. On the nc side, Clipper itself isn't going to get in your way if you want to invoke it one way or another. Are you suggesting that we make a note about the possible differences in nc in the docs somewhere? If so, what exactly would you suggest?

@NightMachinery
Copy link
Author

NightMachinery commented Oct 31, 2018 via email

@bradwood
Copy link

I agree... The brew-installed nc (netcat (The GNU Netcat) 0.7.1) doesn't support -U. So it requires some digging around to make this work... I haven't figured this out yet, and will let you know once I do, but it would be nice to update the readme at least.

@bradwood
Copy link

I ended up going with socat - unix-client:/Users/brad/.clipper.sock as gnu nc doesn't talk to Unix domain sockets from what I can tell and socat is brew-installable.

Now off to check vim-clipper...

@wincent
Copy link
Owner

wincent commented Dec 18, 2018

As you will have seen, vim-clipper is making some assumptions about netcat:

https://github.com/wincent/vim-clipper/blob/35d15d7a096db63f1afce36f3dc1ae28dde4da98/autoload/clipper/private.vim#L5-L13

Namely, it invokes it as nc $ADDRESS $PORT if a port is supplied, and nc -U $SOCKET otherwise. Doesn't work at all if no nc available. Evidently needs to be made more configurable.

wincent added a commit to wincent/vim-clipper that referenced this issue Dec 18, 2018
@wincent wincent changed the title Suggestion Document caveats with BSD netcat vs GNU netcat vs socat etc Dec 18, 2018
@wincent
Copy link
Owner

wincent commented Dec 18, 2018

I added some notes to the docs which should be a good start. Please feel free to hit the edit button and create a PR if you can think of any further improvements.

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

3 participants