diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2020-02-20 17:34:51 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2020-02-20 17:34:51 +0000 |
| commit | 8dee9bf942d3c7c01820e8aace8c768a8fea1ae9 (patch) | |
| tree | 159bc43c5c5df0b1fed2c6ae5835694b6d355071 /client.c | |
| parent | main: add --login-shell command line option (diff) | |
client: add --login-shell command line option
Diffstat (limited to 'client.c')
| -rw-r--r-- | client.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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; |
