Godot template repository for my programs
Diffstat (limited to 'autoloads/CLI.gd')
| -rw-r--r-- | autoloads/CLI.gd | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/autoloads/CLI.gd b/autoloads/CLI.gd index 0ab5e40..095bfd3 100644 --- a/autoloads/CLI.gd +++ b/autoloads/CLI.gd @@ -1,11 +1,11 @@ extends Node func _ready() -> void: - var p := Parser.new() - p.add_argument(Arg.new({triggers=["-h", "--help", "-?"], help="show this help message and exit", action="store_true"})) - var args = p.parse_arguments(OS.get_cmdline_args() + OS.get_cmdline_user_args()) - if args == null: - get_tree().quit() - elif args.get("help", false): - print(p.help()) - get_tree().quit() + var p := Parser.new() + p.add_argument(Arg.new({triggers=["-h", "--help", "-?"], help="show this help message and exit", action="store_true"})) + var args = p.parse_arguments() + if args == null: + get_tree().quit() + elif args.get("help", false): + print(p.help()) + get_tree().quit()
\ No newline at end of file |