Add a Bash completion script for the Godot editor
Created by: Calinou
Follow-up to #34957.
In a future pull request, the zsh completion could be updated to support features only available in the Bash completion, such as contextual extension-based file name filtering.
Props to this article for explaining how to write Bash completion scripts
Preview
List of options
[user@host ~]$ godot --[TAB]
--always-on-top --export-pack --project-manager
--audio-driver --fixed-fps --quiet
--breakpoints --frame-delay --quit
--build-solutions --fullscreen --remote-debug
--check-only --gdnative-generate-json-api --remote-fs
--debug --help --remote-fs-password
--debug-collisions --language --render-thread
--debug-navigation --low-dpi --resolution
--disable-crash-handler --main-pack --script
--disable-render-loop --maximized --test
--disable-vsync-via-compositor --no-docbase --time-scale
--doctool --no-window --upwards
--editor --path --verbose
--enable-vsync-via-compositor --position --version
--export --print-fps --video-driver
--export-debug --profiling --windowed
Option completion
[user@host ~]$ godot --video-driver [TAB]
GLES2 GLES3
Positional argument completion
[user@host some_project]$ godot [TAB]
scene.scn project.godot test.tscn