From 5833e7483357daa24b8ddc1f766a6446d0d30495 Mon Sep 17 00:00:00 2001 From: dvs1 Date: Fri, 25 Oct 2024 13:40:21 +1000 Subject: Moved common stuff like --help, --version to an internal options table we scan as well. --- test_.lua | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'test_.lua') diff --git a/test_.lua b/test_.lua index 8d52896..82c418f 100755 --- a/test_.lua +++ b/test_.lua @@ -6,10 +6,11 @@ local _ = require '_' I'Starting from the top.' -local Help = [[ +Help = [[ This is part of the blah blah blah... ]] +Version = '0.0 crap' local options = { @@ -20,7 +21,7 @@ local options = stop = {help = 'Command to stop the scanning process, for Sys V init.',}, JACK = {help = 'Command to start the JACK stuff, for users.',}, STOP = {help = 'Command to stop the JACK stuff, for users.', - func = function(a, args, i) + func = function(self, a, args, i) --[=[ _.killEmAll{'qsynth'} __[[ @@ -46,13 +47,6 @@ local options = ]=] end }, - help = {help = 'Print help.', - func = function(a, args, i) - print(Help) - os.exit(0) - end - }, - ['--help'] = {help}, } print("start = " .. options.start.value) -- cgit v1.1