aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md3
-rw-r--r--client.c6
-rw-r--r--doc/foot.1.scd6
-rw-r--r--doc/footclient.1.scd6
-rw-r--r--main.c6
5 files changed, 15 insertions, 12 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1787c390..7c2e7c68 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -43,6 +43,9 @@
* The four primary font variants (normal, bold, italic, bold italic)
are now loaded in parallel. This speeds up both the initial startup
time, as well as a DPI changes.
+* Command line parsing no longer tries to parse arguments following
+ the command-to-execute. This means one can now write `foot sh -c
+ true` instead of `foot -- sh -c true`.
### Deprecated
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;
diff --git a/doc/foot.1.scd b/doc/foot.1.scd
index 93c28e4f..1874c0cb 100644
--- a/doc/foot.1.scd
+++ b/doc/foot.1.scd
@@ -5,10 +5,10 @@ foot - Wayland terminal emulator
# SYNOPSIS
*foot* [_OPTIONS_]++
-*foot* [_OPTIONS_] -- <_command_>
+*foot* [_OPTIONS_] <_command_> [_COMMAND OPTIONS_]
-All trailing (non-option) arguments are treated as a command to
-execute (instead of the shell).
+All trailing (non-option) arguments are treated as a command, and its
+arguments, to execute (instead of the default shell).
# OPTIONS
diff --git a/doc/footclient.1.scd b/doc/footclient.1.scd
index 83c00c77..9a43b26b 100644
--- a/doc/footclient.1.scd
+++ b/doc/footclient.1.scd
@@ -5,10 +5,10 @@ footclient - start new terminals in a foot server
# SYNOPSIS
*foot* [_OPTIONS_]++
-*foot* [_OPTIONS_] -- <command>
+*foot* [_OPTIONS_] <_command_> [_COMMAND OPTIONS_]
-All trailing (non-option) arguments are treated as a command to
-execute (instead of the shell).
+All trailing (non-option) arguments are treated as a command, and its
+arguments, to execute (instead of the default shell).
# OPTIONS
diff --git a/main.c b/main.c
index f47fa036..185bb08d 100644
--- a/main.c
+++ b/main.c
@@ -39,8 +39,8 @@ static void
print_usage(const char *prog_name)
{
printf(
- "Usage: %s [OPTIONS]...\n"
- "Usage: %s [OPTIONS]... -- command\n"
+ "Usage: %s [OPTIONS...]\n"
+ "Usage: %s [OPTIONS...] command [ARGS...]\n"
"\n"
"Options:\n"
" -c,--config=PATH load configuration from PATH (XDG_CONFIG_HOME/footrc)\n"
@@ -179,7 +179,7 @@ main(int argc, char *const *argv)
bool log_syslog = true;
while (true) {
- int c = getopt_long(argc, argv, "c:t:a:Lf:g:s::Pp:l::Svh", longopts, NULL);
+ int c = getopt_long(argc, argv, "+c:t:a:Lf:g:s::Pp:l::Svh", longopts, NULL);
if (c == -1)
break;