From 9b5bb8390cd5318a29ce6249b9f16a06d11b78f3 Mon Sep 17 00:00:00 2001 From: Nicolas Viennot Date: Sun, 27 Mar 2016 02:29:43 -0400 Subject: [PATCH] better error message --- client.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/client.c b/client.c index 3db8783f..164abdd3 100644 --- a/client.c +++ b/client.c @@ -296,6 +296,13 @@ client_main(struct event_base *base, int argc, char **argv, int flags, fprintf(stderr, "no server running on %s\n", socket_path); } else { +#ifdef TMATE + if (errno == ENOENT) + fprintf(stderr, "You must specify a socket name with -S. For example: \n" + " tmate -S /tmp/tmate.sock new-session -d\n" + " tmate -S /tmp/tmate.sock wait tmate-ready\n"); + else +#endif fprintf(stderr, "error connecting to %s (%s)\n", socket_path, strerror(errno)); }