mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-19 05:33:44 -04:00
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
This commit is contained in:
parent
56d53ec2a1
commit
5b70f94827
5 changed files with 15 additions and 12 deletions
6
main.c
6
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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue