mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-04 04:06:06 -05:00
main/client: replace some uses of printf() with puts() in print_usage()
FOOT_DEFAULT_TERM is a string literal passed as a -D argument to the compiler, so it can just be concatenated with the other string literals, instead of being formatted with printf().
This commit is contained in:
parent
ed0ef4bb1d
commit
537cd9b367
2 changed files with 28 additions and 27 deletions
39
client.c
39
client.c
|
|
@ -54,27 +54,28 @@ version_and_features(void)
|
|||
static void
|
||||
print_usage(const char *prog_name)
|
||||
{
|
||||
static const char options[] =
|
||||
"\nOptions:\n"
|
||||
" -t,--term=TERM value to set the environment variable TERM to (" FOOT_DEFAULT_TERM ")\n"
|
||||
" -T,--title=TITLE initial window title (foot)\n"
|
||||
" -a,--app-id=ID window application ID (foot)\n"
|
||||
" -w,--window-size-pixels=WIDTHxHEIGHT initial width and height, in pixels\n"
|
||||
" -W,--window-size-chars=WIDTHxHEIGHT initial width and height, in characters\n"
|
||||
" -m,--maximized start in maximized mode\n"
|
||||
" -F,--fullscreen start in fullscreen mode\n"
|
||||
" -L,--login-shell start shell as a login shell\n"
|
||||
" -D,--working-directory=DIR directory to start in (CWD)\n"
|
||||
" -s,--server-socket=PATH path to the server UNIX domain socket (default=$XDG_RUNTIME_DIR/foot-$WAYLAND_DISPLAY.sock)\n"
|
||||
" -H,--hold remain open after child process exits\n"
|
||||
" -N,--no-wait detach the client process from the running terminal, exiting immediately\n"
|
||||
" -o,--override=[section.]key=value override configuration option\n"
|
||||
" -d,--log-level={info|warning|error|none} log level (info)\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";
|
||||
|
||||
printf("Usage: %s [OPTIONS...]\n", prog_name);
|
||||
printf("Usage: %s [OPTIONS...] command [ARGS...]\n", prog_name);
|
||||
printf("\n");
|
||||
printf("Options:\n");
|
||||
printf(" -t,--term=TERM value to set the environment variable TERM to (%s)\n"
|
||||
" -T,--title=TITLE initial window title (foot)\n"
|
||||
" -a,--app-id=ID window application ID (foot)\n"
|
||||
" -w,--window-size-pixels=WIDTHxHEIGHT initial width and height, in pixels\n"
|
||||
" -W,--window-size-chars=WIDTHxHEIGHT initial width and height, in characters\n"
|
||||
" -m,--maximized start in maximized mode\n"
|
||||
" -F,--fullscreen start in fullscreen mode\n"
|
||||
" -L,--login-shell start shell as a login shell\n"
|
||||
" -D,--working-directory=DIR directory to start in (CWD)\n"
|
||||
" -s,--server-socket=PATH path to the server UNIX domain socket (default=$XDG_RUNTIME_DIR/foot-$WAYLAND_DISPLAY.sock)\n"
|
||||
" -H,--hold remain open after child process exits\n"
|
||||
" -N,--no-wait detach the client process from the running terminal, exiting immediately\n"
|
||||
" -o,--override=[section.]key=value override configuration option\n"
|
||||
" -d,--log-level={info|warning|error|none} log level (info)\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",
|
||||
FOOT_DEFAULT_TERM);
|
||||
puts(options);
|
||||
}
|
||||
|
||||
static bool NOINLINE
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue