diff options
author | 2011-01-21 00:41:36 -0500 | |
---|---|---|
committer | 2011-01-21 00:41:36 -0500 | |
commit | 78bcda2db6b0b8669a6fbcf63b1143602f544416 (patch) | |
tree | df837e91e357573ca84be0b20155189252337cec /core/args.lua | |
parent | 2247eeb38c71da492cb96711e133b353e7c3129d (diff) |
Code cleanup.
Diffstat (limited to 'core/args.lua')
-rw-r--r-- | core/args.lua | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/core/args.lua b/core/args.lua index b57c69ec..d9f959e1 100644 --- a/core/args.lua +++ b/core/args.lua @@ -59,17 +59,10 @@ end -- Shows all registered command line switches in a help dialog. local function show_help() - local line = "%s [%d args] -- %s" - local help = {} - for key, switch in pairs(switches) do - help[#help + 1] = line:format(key, unpack(switch, 2)) - end - table.sort(help) - gui.dialog('textbox', - '--title', 'Command line parameters', - '--text', table.concat(help, '\n'), - '--button1', 'gtk-ok') - events.emit('arg_none') + _G.print('Usage: textadept [args] [filenames]') + local line = " %s [%d args]: %s" + for k, v in pairs(switches) do _G.print(line:format(k, unpack(v, 2))) end + os.exit() end register('-h', '--help', 0, show_help, 'Displays this') |