From 8dee9bf942d3c7c01820e8aace8c768a8fea1ae9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Thu, 20 Feb 2020 18:34:51 +0100 Subject: [PATCH] client: add --login-shell command line option --- client.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/client.c b/client.c index 33af8e87..de7c6c6f 100644 --- a/client.c +++ b/client.c @@ -33,6 +33,7 @@ print_usage(const char *prog_name) printf("\n"); printf("Options:\n"); printf(" -t,--term=TERM value to set the environment variable TERM to (foot)\n" + " --login-shell start shell as a login shell\n" " -s,--server-socket=PATH path to the server UNIX domain socket (default=XDG_RUNTIME_DIR/foot.sock)\n" " -l,--log-colorize=[never|always|auto] enable/disable colorization of log output on stderr\n" " -v,--version show the version number and quit\n"); @@ -47,6 +48,7 @@ main(int argc, char *const *argv) static const struct option longopts[] = { {"term", required_argument, 0, 't'}, + {"login-shell", no_argument, 0, 'L'}, {"server-socket", required_argument, 0, 's'}, {"log-colorize", optional_argument, NULL, 'l'}, {"version", no_argument, 0, 'v'}, @@ -57,6 +59,7 @@ main(int argc, char *const *argv) const char *term = ""; const char *server_socket_path = NULL; enum log_colorize log_colorize = LOG_COLORIZE_AUTO; + bool login_shell = false; while (true) { int c = getopt_long(argc, argv, ":t:s:l::hv", longopts, NULL); @@ -68,6 +71,10 @@ main(int argc, char *const *argv) term = optarg; break; + case 'L': + login_shell = true; + break; + case 's': server_socket_path = optarg; break;