diff options
author | mitchell <70453897+667e-11@users.noreply.github.com> | 2012-08-01 14:06:58 -0400 |
---|---|---|
committer | mitchell <70453897+667e-11@users.noreply.github.com> | 2012-08-01 14:06:58 -0400 |
commit | a165844bc804999809d794d83fdec5f1575a4492 (patch) | |
tree | 85c04e792b8bb3e08efcf14670eb24884464ceb4 /core/args.lua | |
parent | f1be0e38d3a28328269fc1f219109513041690af (diff) |
Disable showing help in ncurses; core/args.lua
Lua 'print' statements do not work properly once ncurses has been initialized
and there is no way to print to a buffer without overwriting an existing
session on exit.
Diffstat (limited to 'core/args.lua')
-rw-r--r-- | core/args.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/args.lua b/core/args.lua index 46ea7769..687735ce 100644 --- a/core/args.lua +++ b/core/args.lua @@ -65,14 +65,14 @@ function M.process(arg) if no_args then events.emit('arg_none') end end --- Shows all registered command line switches in a help dialog. +-- Shows all registered command line switches on the command line. local function show_help() print('Usage: textadept [args] [filenames]') local line = " %s [%d args]: %s" for k, v in pairs(switches) do print(line:format(k, table.unpack(v, 2))) end os.exit() end -M.register('-h', '--help', 0, show_help, 'Displays this') +if not NCURSES then M.register('-h', '--help', 0, show_help, 'Shows this') end -- For Windows, create arg table from single command line string (arg[0]). if WIN32 and #arg[0] > 0 then |