2020-01-09 16:53:13 +00:00
#compdef godot
# zsh completion for the Godot editor
# To use it, install this file as `_godot` in a directory specified in your
# `fpath` environment variable then restart your shell.
#
2022-01-03 20:27:34 +00:00
# Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur.
# Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md).
2020-01-09 16:53:13 +00:00
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
_arguments \
"1::path to scene or 'project.godot' file:_files" \
'(-h --help)'{-h,--help}'[display the full help message]' \
'--version[display the version string]' \
'(-v --verbose)'{-v,--verbose}'[use verbose stdout mode]' \
2021-12-07 17:06:40 +00:00
'(-q --quiet)'{-q,--quiet}'[quiet mode, silences stdout messages (errors are still displayed)]' \
2020-01-09 16:53:13 +00:00
'(-e --editor)'{-e,--editor}'[start the editor instead of running the scene]' \
'(-p --project-manager)'{-p,--project-manager}'[start the project manager, even if a project is auto-detected]' \
2021-12-07 19:07:47 +00:00
'--debug-server[start the editor debug server]:editor debugger listen address' \
2021-12-07 17:06:40 +00:00
'--quit[quit after the first iteration]' \
2020-01-09 16:53:13 +00:00
'(-l --language)'{-l,--language}'[use a specific locale (<locale> being a two-letter code)]:two-letter locale code' \
"--path[path to a project (<directory> must contain a 'project.godot' file)]:path to directory with 'project.godot' file:_dirs" \
'(-u --upwards)'{-u,--upwards}'[scan folders upwards for project.godot file]' \
'--main-pack[path to a pack (.pck) file to load]:path to .pck file:_files' \
'--render-thread[set the render thread mode]:render thread mode:(unsafe safe separate)' \
'--remote-fs[use a remote filesystem]:remote filesystem address' \
'--remote-fs-password[password for remote filesystem]:remote filesystem password' \
'--audio-driver[set the audio driver]:audio driver name' \
2021-12-07 19:07:47 +00:00
'--display-driver[set the display driver]:display driver name' \
2022-09-08 00:44:36 +00:00
"--rendering-method[set the renderer]:renderer name:((forward_plus\:'Desktop renderer' mobile\:'Desktop and mobile renderer' gl_compatibility\:'Desktop, mobile and web renderer'))" \
2021-12-07 19:07:47 +00:00
"--rendering-driver[set the rendering driver]:rendering driver name:((vulkan\:'Vulkan renderer' opengl3\:'OpenGL ES 3.0 renderer' dummy\:'Dummy renderer'))" \
"--gpu-index[use a specific GPU (run with --verbose to get available device list)]:device index" \
'--text-driver[set the text driver]:text driver name' \
'--tablet-driver[set the pen tablet input driver]:tablet driver name' \
'--headless[enable headless mode (--display-driver headless --audio-driver Dummy), useful for servers and with --script]' \
2022-11-14 18:31:24 +00:00
'--write-movie[writes a video to the specified path (usually with .avi or .png extension)]:path to output video file' \
2020-01-09 16:53:13 +00:00
'(-f --fullscreen)'{-f,--fullscreen}'[request fullscreen mode]' \
'(-m --maximized)'{-m,--maximized}'[request a maximized window]' \
'(-w --windowed)'{-w,--windowed}'[request windowed mode]' \
'(-t --always-on-top)'{-t,--always-on-top}'[request an always-on-top window]' \
'--resolution[request window resolution]:resolution in WxH format' \
'--position[request window position]:position in X,Y format' \
2021-12-07 19:07:47 +00:00
'--single-window[use a single window (no separate subwindows)]' \
2022-11-14 18:31:24 +00:00
'--xr-mode[select Extended Reality (XR) mode]:Extended Reality (XR) mode:(default off on)' \
2020-01-09 16:53:13 +00:00
'(-d --debug)'{-d,--debug}'[debug (local stdout debugger)]' \
'(-b --breakpoints)'{-b,--breakpoints}'[specify the breakpoint list as source::line comma-separated pairs, no spaces (use %20 instead)]:breakpoint list' \
'--profiling[enable profiling in the script debugger]' \
2021-12-07 19:07:47 +00:00
'--gpu-profile[show a GPU profile of the tasks that took the most time during frame rendering]' \
2022-05-16 19:34:18 +00:00
'--gpu-validation[enable graphics API validation layers for debugging]' \
'--gpu-abort[abort on graphics API usage errors (usually validation layer errors)]' \
2020-01-09 16:53:13 +00:00
'--remote-debug[enable remote debugging]:remote debugger address' \
'--debug-collisions[show collision shapes when running the scene]' \
'--debug-navigation[show navigation polygons when running the scene]' \
2022-03-13 23:44:19 +00:00
'--debug-stringnames[print all StringName allocations to stdout when the engine quits]' \
2020-01-09 16:53:13 +00:00
'--frame-delay[simulate high CPU load (delay each frame by the given number of milliseconds)]:number of milliseconds' \
'--time-scale[force time scale (higher values are faster, 1.0 is normal speed)]:time scale' \
2022-11-14 18:31:24 +00:00
'--disable-vsync[disable vertical synchronization even if enabled in the project settings]' \
2020-01-09 16:53:13 +00:00
'--disable-render-loop[disable render loop so rendering only occurs when called explicitly from script]' \
'--disable-crash-handler[disable crash handler when supported by the platform code]' \
'--fixed-fps[force a fixed number of frames per second (this setting disables real-time synchronization)]:frames per second' \
'--print-fps[print the frames per second to the stdout]' \
'(-s, --script)'{-s,--script}'[run a script]:path to script:_files' \
'--check-only[only parse for errors and quit (use with --script)]' \
2022-04-15 15:11:53 +00:00
'--export-release[export the project in release mode using the given preset and output path]:export preset name then path' \
'--export-debug[export the project in debug mode using the given preset and output path]:export preset name then path' \
'--export-pack[export the project data only as a PCK or ZIP file using the given preset and output path]:export preset name then path' \
2022-03-10 15:21:22 +00:00
'--convert-3to4[converts project from Godot 3.x to Godot 4.x]' \
'--validate-conversion-3to4[shows what elements will be renamed when converting project from Godot 3.x to Godot 4.x]' \
2021-12-07 19:07:47 +00:00
'--doctool[dump the engine API reference to the given path in XML format, merging if existing files are found]:path to base Godot build directory (optional):_dirs' \
2020-01-09 16:53:13 +00:00
'--no-docbase[disallow dumping the base types (used with --doctool)]' \
'--build-solutions[build the scripting solutions (e.g. for C# projects)]' \
2022-10-12 14:21:34 +00:00
'--dump-gdextension-interface[generate GDExtension header file 'gdnative_interface.h' in the current folder. This file is the base file required to implement a GDExtension.]' \
2021-12-07 19:07:47 +00:00
'--dump-extension-api[generate JSON dump of the Godot API for GDExtension bindings named "extension_api.json" in the current folder]' \
2022-11-14 18:31:24 +00:00
'--startup-benchmark[benchmark the startup time and print it to console]' \
'--startup-benchmark-file[benchmark the startup time and save it to a given file in JSON format]:path to output JSON file' \
2021-12-07 19:07:47 +00:00
'--test[run all unit tests; run with "--test --help" for more information]'