From e6d83576855354db5ebb5e75897a375e804d2e9f Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Mon, 14 Nov 2022 19:31:24 +0100 Subject: [PATCH] Improve command line help to fit on narrower displays - Update shell completions to reference recently added CLI arguments. --- main/main.cpp | 140 +++++++++++++------------- misc/dist/shell/_godot.zsh-completion | 6 +- misc/dist/shell/godot.bash-completion | 9 ++ misc/dist/shell/godot.fish | 5 +- 4 files changed, 90 insertions(+), 70 deletions(-) diff --git a/main/main.cpp b/main/main.cpp index 2d0843a331b..cb449d9dc7b 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -311,29 +311,29 @@ void Main::print_help(const char *p_binary) { OS::get_singleton()->print("\n"); OS::get_singleton()->print("General options:\n"); - OS::get_singleton()->print(" -h, --help Display this help message.\n"); - OS::get_singleton()->print(" --version Display the version string.\n"); - OS::get_singleton()->print(" -v, --verbose Use verbose stdout mode.\n"); - OS::get_singleton()->print(" -q, --quiet Quiet mode, silences stdout messages. Errors are still displayed.\n"); + OS::get_singleton()->print(" -h, --help Display this help message.\n"); + OS::get_singleton()->print(" --version Display the version string.\n"); + OS::get_singleton()->print(" -v, --verbose Use verbose stdout mode.\n"); + OS::get_singleton()->print(" -q, --quiet Quiet mode, silences stdout messages. Errors are still displayed.\n"); OS::get_singleton()->print("\n"); OS::get_singleton()->print("Run options:\n"); - OS::get_singleton()->print(" --, ++ Separator for user-provided arguments. Following arguments are not used by the engine, but can be read from `OS.get_cmdline_user_args()`.\n"); + OS::get_singleton()->print(" --, ++ Separator for user-provided arguments. Following arguments are not used by the engine, but can be read from `OS.get_cmdline_user_args()`.\n"); #ifdef TOOLS_ENABLED - OS::get_singleton()->print(" -e, --editor Start the editor instead of running the scene.\n"); - OS::get_singleton()->print(" -p, --project-manager Start the project manager, even if a project is auto-detected.\n"); - OS::get_singleton()->print(" --debug-server Start the editor debug server (://[:], e.g. tcp://127.0.0.1:6007)\n"); + OS::get_singleton()->print(" -e, --editor Start the editor instead of running the scene.\n"); + OS::get_singleton()->print(" -p, --project-manager Start the project manager, even if a project is auto-detected.\n"); + OS::get_singleton()->print(" --debug-server Start the editor debug server (://[:], e.g. tcp://127.0.0.1:6007)\n"); #endif - OS::get_singleton()->print(" --quit Quit after the first iteration.\n"); - OS::get_singleton()->print(" -l, --language Use a specific locale ( being a two-letter code).\n"); - OS::get_singleton()->print(" --path Path to a project ( must contain a 'project.godot' file).\n"); - OS::get_singleton()->print(" -u, --upwards Scan folders upwards for project.godot file.\n"); - OS::get_singleton()->print(" --main-pack Path to a pack (.pck) file to load.\n"); - OS::get_singleton()->print(" --render-thread Render thread mode ('unsafe', 'safe', 'separate').\n"); - OS::get_singleton()->print(" --remote-fs
Remote filesystem ([:] address).\n"); - OS::get_singleton()->print(" --remote-fs-password Password for remote filesystem.\n"); + OS::get_singleton()->print(" --quit Quit after the first iteration.\n"); + OS::get_singleton()->print(" -l, --language Use a specific locale ( being a two-letter code).\n"); + OS::get_singleton()->print(" --path Path to a project ( must contain a 'project.godot' file).\n"); + OS::get_singleton()->print(" -u, --upwards Scan folders upwards for project.godot file.\n"); + OS::get_singleton()->print(" --main-pack Path to a pack (.pck) file to load.\n"); + OS::get_singleton()->print(" --render-thread Render thread mode ['unsafe', 'safe', 'separate'].\n"); + OS::get_singleton()->print(" --remote-fs
Remote filesystem ([:] address).\n"); + OS::get_singleton()->print(" --remote-fs-password Password for remote filesystem.\n"); - OS::get_singleton()->print(" --audio-driver Audio driver ["); + OS::get_singleton()->print(" --audio-driver Audio driver ["); for (int i = 0; i < AudioDriverManager::get_driver_count(); i++) { if (i > 0) { OS::get_singleton()->print(", "); @@ -342,7 +342,7 @@ void Main::print_help(const char *p_binary) { } OS::get_singleton()->print("].\n"); - OS::get_singleton()->print(" --display-driver Display driver (and rendering driver) ["); + OS::get_singleton()->print(" --display-driver Display driver (and rendering driver) ["); for (int i = 0; i < DisplayServer::get_create_function_count(); i++) { if (i > 0) { OS::get_singleton()->print(", "); @@ -359,72 +359,76 @@ void Main::print_help(const char *p_binary) { } OS::get_singleton()->print("].\n"); - OS::get_singleton()->print(" --rendering-method Renderer name. Requires driver support.\n"); - OS::get_singleton()->print(" --rendering-driver Rendering driver (depends on display driver).\n"); - OS::get_singleton()->print(" --gpu-index Use a specific GPU (run with --verbose to get available device list).\n"); - OS::get_singleton()->print(" --text-driver Text driver (Fonts, BiDi, shaping)\n"); - OS::get_singleton()->print(" --tablet-driver Pen tablet input driver.\n"); - OS::get_singleton()->print(" --headless Enable headless mode (--display-driver headless --audio-driver Dummy). Useful for servers and with --script.\n"); - OS::get_singleton()->print(" --write-movie Run the engine in a way that a movie is written (by default .avi MJPEG). Fixed FPS is forced when enabled, but can be used to change movie FPS. Disabling vsync can speed up movie writing but makes interaction more difficult.\n"); - OS::get_singleton()->print(" --disable-vsync Force disabling of vsync. Run the engine in a way that a movie is written (by default .avi MJPEG). Fixed FPS is forced when enabled, but can be used to change movie FPS.\n"); + OS::get_singleton()->print(" --rendering-method Renderer name. Requires driver support.\n"); + OS::get_singleton()->print(" --rendering-driver Rendering driver (depends on display driver).\n"); + OS::get_singleton()->print(" --gpu-index Use a specific GPU (run with --verbose to get available device list).\n"); + OS::get_singleton()->print(" --text-driver Text driver (Fonts, BiDi, shaping).\n"); + OS::get_singleton()->print(" --tablet-driver Pen tablet input driver.\n"); + OS::get_singleton()->print(" --headless Enable headless mode (--display-driver headless --audio-driver Dummy). Useful for servers and with --script.\n"); + OS::get_singleton()->print(" --write-movie Writes a video to the specified path (usually with .avi or .png extension).\n"); + OS::get_singleton()->print(" --fixed-fps is forced when enabled, but it can be used to change movie FPS.\n"); + OS::get_singleton()->print(" --disable-vsync can speed up movie writing but makes interaction more difficult.\n"); OS::get_singleton()->print("\n"); OS::get_singleton()->print("Display options:\n"); - OS::get_singleton()->print(" -f, --fullscreen Request fullscreen mode.\n"); - OS::get_singleton()->print(" -m, --maximized Request a maximized window.\n"); - OS::get_singleton()->print(" -w, --windowed Request windowed mode.\n"); - OS::get_singleton()->print(" -t, --always-on-top Request an always-on-top window.\n"); - OS::get_singleton()->print(" --resolution x Request window resolution.\n"); - OS::get_singleton()->print(" --position , Request window position.\n"); - OS::get_singleton()->print(" --single-window Use a single window (no separate subwindows).\n"); - OS::get_singleton()->print(" --xr-mode Select XR mode (default/off/on).\n"); + OS::get_singleton()->print(" -f, --fullscreen Request fullscreen mode.\n"); + OS::get_singleton()->print(" -m, --maximized Request a maximized window.\n"); + OS::get_singleton()->print(" -w, --windowed Request windowed mode.\n"); + OS::get_singleton()->print(" -t, --always-on-top Request an always-on-top window.\n"); + OS::get_singleton()->print(" --resolution x Request window resolution.\n"); + OS::get_singleton()->print(" --position , Request window position.\n"); + OS::get_singleton()->print(" --single-window Use a single window (no separate subwindows).\n"); + OS::get_singleton()->print(" --xr-mode Select XR (Extended Reality) mode ['default', 'off', 'on'].\n"); OS::get_singleton()->print("\n"); OS::get_singleton()->print("Debug options:\n"); - OS::get_singleton()->print(" -d, --debug Debug (local stdout debugger).\n"); - OS::get_singleton()->print(" -b, --breakpoints Breakpoint list as source::line comma-separated pairs, no spaces (use %%20 instead).\n"); - OS::get_singleton()->print(" --profiling Enable profiling in the script debugger.\n"); - OS::get_singleton()->print(" --gpu-profile Show a GPU profile of the tasks that took the most time during frame rendering.\n"); - OS::get_singleton()->print(" --gpu-validation Enable graphics API validation layers for debugging.\n"); + OS::get_singleton()->print(" -d, --debug Debug (local stdout debugger).\n"); + OS::get_singleton()->print(" -b, --breakpoints Breakpoint list as source::line comma-separated pairs, no spaces (use %%20 instead).\n"); + OS::get_singleton()->print(" --profiling Enable profiling in the script debugger.\n"); + OS::get_singleton()->print(" --gpu-profile Show a GPU profile of the tasks that took the most time during frame rendering.\n"); + OS::get_singleton()->print(" --gpu-validation Enable graphics API validation layers for debugging.\n"); #if DEBUG_ENABLED - OS::get_singleton()->print(" --gpu-abort Abort on graphics API usage errors (usually validation layer errors). May help see the problem if your system freezes.\n"); + OS::get_singleton()->print(" --gpu-abort Abort on graphics API usage errors (usually validation layer errors). May help see the problem if your system freezes.\n"); #endif - OS::get_singleton()->print(" --remote-debug Remote debug (://[:], e.g. tcp://127.0.0.1:6007).\n"); + OS::get_singleton()->print(" --remote-debug Remote debug (://[:], e.g. tcp://127.0.0.1:6007).\n"); #if defined(DEBUG_ENABLED) - OS::get_singleton()->print(" --debug-collisions Show collision shapes when running the scene.\n"); - OS::get_singleton()->print(" --debug-paths Show path lines when running the scene.\n"); - OS::get_singleton()->print(" --debug-navigation Show navigation polygons when running the scene.\n"); - OS::get_singleton()->print(" --debug-stringnames Print all StringName allocations to stdout when the engine quits.\n"); + OS::get_singleton()->print(" --debug-collisions Show collision shapes when running the scene.\n"); + OS::get_singleton()->print(" --debug-paths Show path lines when running the scene.\n"); + OS::get_singleton()->print(" --debug-navigation Show navigation polygons when running the scene.\n"); + OS::get_singleton()->print(" --debug-stringnames Print all StringName allocations to stdout when the engine quits.\n"); #endif - OS::get_singleton()->print(" --frame-delay Simulate high CPU load (delay each frame by milliseconds).\n"); - OS::get_singleton()->print(" --time-scale Force time scale (higher values are faster, 1.0 is normal speed).\n"); - OS::get_singleton()->print(" --disable-render-loop Disable render loop so rendering only occurs when called explicitly from script.\n"); - OS::get_singleton()->print(" --disable-crash-handler Disable crash handler when supported by the platform code.\n"); - OS::get_singleton()->print(" --fixed-fps Force a fixed number of frames per second. This setting disables real-time synchronization.\n"); - OS::get_singleton()->print(" --print-fps Print the frames per second to the stdout.\n"); + OS::get_singleton()->print(" --frame-delay Simulate high CPU load (delay each frame by milliseconds).\n"); + OS::get_singleton()->print(" --time-scale Force time scale (higher values are faster, 1.0 is normal speed).\n"); + OS::get_singleton()->print(" --disable-vsync Forces disabling of vertical synchronization, even if enabled in the project settings. Does not override driver-level V-Sync enforcement.\n"); + OS::get_singleton()->print(" --disable-render-loop Disable render loop so rendering only occurs when called explicitly from script.\n"); + OS::get_singleton()->print(" --disable-crash-handler Disable crash handler when supported by the platform code.\n"); + OS::get_singleton()->print(" --fixed-fps Force a fixed number of frames per second. This setting disables real-time synchronization.\n"); + OS::get_singleton()->print(" --print-fps Print the frames per second to the stdout.\n"); OS::get_singleton()->print("\n"); OS::get_singleton()->print("Standalone tools:\n"); - OS::get_singleton()->print(" -s, --script