diff --git a/core/modules/help/_register.lua b/core/modules/help/_register.lua new file mode 100644 index 0000000000..70a3c31c0b --- /dev/null +++ b/core/modules/help/_register.lua @@ -0,0 +1,8 @@ +commandLineOption { + trigger = '--help', + description = 'Display this information', + execute = function() + local help = require('help') + help.printHelp() + end +} \ No newline at end of file diff --git a/core/modules/main/core_options.lua b/core/modules/main/core_options.lua index f899ad7ec1..e2d87c755c 100644 --- a/core/modules/main/core_options.lua +++ b/core/modules/main/core_options.lua @@ -4,6 +4,7 @@ local m = select(1, ...) +register('help') commandLineOption { trigger = '--file', @@ -12,15 +13,6 @@ commandLineOption { default = m.PROJECT_SCRIPT_NAME } -commandLineOption { -- TODO: Move to help module; use `register()` - trigger = '--help', - description = 'Display this information', - execute = function() - local help = require('help') - help.printHelp() - end -} - commandLineOption { trigger = '--scripts', description = "Search for additional scripts on the given path",