aboutsummaryrefslogtreecommitdiff
path: root/client.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-05-08 16:43:03 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-05-08 16:43:03 +0000
commit5b70f94827b365b44b0d28a8e3768fa9eb4268ca (patch)
treeab6843a1b4ab57f8b8c00f4a0c9f0850855a1a70 /client.c
parentterm: don't register ptmx with FDM if we're shutting down (diff)
main/client: be POSIXLY_CORRECT when parsing command line
This means command line parsing stops when it encounters the first nonoption argument. The result is that one no longer need to use '--' to ensure arguments are passed to the shell/command, instead of parsed by foot. That is, instead of foot -- sh -c true one can now do foot sh -c true Arguments to foot *must* go before the command: foot --fullscreen sh -c true
Diffstat (limited to 'client.c')
-rw-r--r--client.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/client.c b/client.c
index 754f349b..1458c7cd 100644
--- a/client.c
+++ b/client.c
@@ -28,8 +28,8 @@ sig_handler(int signo)
static void
print_usage(const char *prog_name)
{
- printf("Usage: %s [OPTIONS]...\n", prog_name);
- printf("Usage: %s [OPTIONS]... -- command\n", prog_name);
+ printf("Usage: %s [OPTIONS...]", prog_name);
+ printf("Usage: %s [OPTIONS...] [ARGS...]\n", prog_name);
printf("\n");
printf("Options:\n");
printf(" -t,--term=TERM value to set the environment variable TERM to (foot)\n"
@@ -74,7 +74,7 @@ main(int argc, char *const *argv)
bool fullscreen = false;
while (true) {
- int c = getopt_long(argc, argv, ":t:a:s:l::hv", longopts, NULL);
+ int c = getopt_long(argc, argv, "+:t:a:s:l::hv", longopts, NULL);
if (c == -1)
break;