Last active
April 21, 2022 15:03
-
-
Save AFCMS/adb2035d77ad1a37918a7714946e2dbf to your computer and use it in GitHub Desktop.
Minetest ZSH Completion
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#compdef minetest | |
local curcontext="$curcontext" state line | |
typeset -A opt_arg | |
_arguments -s -C \ | |
'--address[Address to connect to]:url:_urls'\ | |
'--color[Coloured logs]:type:(always never auto)'\ | |
'--config[Load configuration from specified file.]:file:_files -g *.conf'\ | |
'--gameid[Set gameid]'\ | |
'--go[Disable main menu]'\ | |
'--help[Show allowed options]'\ | |
'--info[Print more informations to console]'\ | |
'--logfile[Set logfile path]:file:_files -g *.log'\ | |
'--migrate[Migrate from current map backend to another]:str'\ | |
'--migrate-auth[Migrate from current auth backend to another]:str'\ | |
'--migrate-mod-storage[Migrate from current mod storage backend to another (Only works when using minetestserver or with --server]:str'\ | |
'--migrate-players[Migrate from current players backend to another]:str'\ | |
'--name[Set player name]:str'\ | |
'--password[Set password]:str'\ | |
'--password-file[Set password from contents of file]:file:_files'\ | |
'--port[Set network port (UDP)]:port'\ | |
'--quiet[Print to console errors only]'\ | |
'--random-input[Enable random user input, for testing]'\ | |
'--run-unittests[Run the unit tests and exit]'\ | |
'--server[Run dedicated server]'\ | |
'--speedtests[Run speed tests and exit]'\ | |
'--terminal[Feature an interactive terminal]'\ | |
'--trace[Print enormous amount of information to log and console]'\ | |
'--verbose[Print even more information to the console]'\ | |
'--version[Show version information]'\ | |
'--videomodes[Show available video modes]'\ | |
'(--worldname)--world[Set the world path]:dir:_dirs'\ | |
'--worldlist[Get list of worlds]:type:(path name both)'\ | |
'(--world)--worldname[Set the world by name]:str'\ | |
case "$state" in | |
world) | |
_values -C 'Set the world by name' ${$(minetest --worldlist name|awk 'NR!=1'):-""} | |
return | |
;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment