diff --git a/abduco.1 b/abduco.1 index 90ed721..fa5a84f 100644 --- a/abduco.1 +++ b/abduco.1 @@ -77,8 +77,9 @@ domain socket representing a session is deleted, sending .BR SIGUSR1 to the server process will recreate it. -If standard input does not refer to a terminal, its content is passed -through to the underlying session. +If standard input does not refer to a terminal (or the +.B -p +option was given), its content is passed through to the underlying session. .SH OPTIONS If no command line arguments are given all currently active sessions are printed sorted by their respective creation date. Lines starting with an @@ -120,6 +121,13 @@ Attach with the lowest priority, meaning this client will be the last to control .TP .BI \-q Be quiet, do not print informative messages. +.TP +.BI \-p +Pass through content of standard input to the session. Implies the +.B \-q +and +.B \-l +options. .SH EXAMPLE Start a new session (assuming .BR dvtm(1) diff --git a/abduco.c b/abduco.c index 4756342..a288490 100644 --- a/abduco.c +++ b/abduco.c @@ -222,7 +222,7 @@ static void die(const char *s) { } static void usage(void) { - fprintf(stderr, "usage: abduco [-a|-A|-c|-n] [-r] [-q] [-l] [-f] [-e detachkey] name command\n"); + fprintf(stderr, "usage: abduco [-a|-A|-c|-n] [-p] [-r] [-q] [-l] [-f] [-e detachkey] name command\n"); exit(EXIT_FAILURE); } @@ -590,7 +590,7 @@ int main(int argc, char *argv[]) { passthrough = !isatty(STDIN_FILENO); - while ((opt = getopt(argc, argv, "aAclne:fqrv")) != -1) { + while ((opt = getopt(argc, argv, "aAclne:fpqrv")) != -1) { switch (opt) { case 'a': case 'A': @@ -608,6 +608,9 @@ int main(int argc, char *argv[]) { case 'f': force = true; break; + case 'p': + passthrough = true; + break; case 'q': quiet = true; break; @@ -626,6 +629,8 @@ int main(int argc, char *argv[]) { } if (passthrough) { + if (!action) + action = 'a'; quiet = true; client.flags |= CLIENT_LOWPRIORITY; }