main: use a single printf() when printing usage

This commit is contained in:
Daniel Eklöf 2019-12-29 18:26:29 +01:00
parent 8854ae134d
commit 67bacc2a94
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

24
main.c
View file

@ -35,17 +35,19 @@ sig_handler(int signo)
static void static void
print_usage(const char *prog_name) print_usage(const char *prog_name)
{ {
printf("Usage: %s [OPTIONS]...\n", prog_name); printf(
printf("Usage: %s [OPTIONS]... -- command\n", prog_name); "Usage: %s [OPTIONS]...\n"
printf("\n"); "Usage: %s [OPTIONS]... -- command\n"
printf("Options:\n"); "\n"
printf(" -c,--config=PATH load configuration from PATH (XDG_CONFIG_HOME/footrc)\n" "Options:\n"
" -f,--font=FONT comma separated list of fonts in fontconfig format (monospace)\n" " -c,--config=PATH load configuration from PATH (XDG_CONFIG_HOME/footrc)\n"
" -t,--term=TERM value to set the environment variable TERM to (foot)\n" " -f,--font=FONT comma separated list of fonts in fontconfig format (monospace)\n"
" -g,--geometry=WIDTHxHEIGHT set initial width and height\n" " -t,--term=TERM value to set the environment variable TERM to (foot)\n"
" -s,--server[=PATH] run as a server (use 'footclient' to start terminals).\n" " -g,--geometry=WIDTHxHEIGHT set initial width and height\n"
" Without PATH, XDG_RUNTIME_DIR/foot.sock will be used.\n" " -s,--server[=PATH] run as a server (use 'footclient' to start terminals).\n"
" -v,--version show the version number and quit\n"); " Without PATH, XDG_RUNTIME_DIR/foot.sock will be used.\n"
" -v,--version show the version number and quit\n",
prog_name, prog_name);
} }
bool bool