mirror of
https://github.com/TangentFoxy/argparse.git
synced 2025-07-29 03:22:18 +00:00
Fix whitespace warnings
This commit is contained in:
@@ -51,7 +51,7 @@ An epilog.]], parser:get_help())
|
|||||||
:args "2"
|
:args "2"
|
||||||
parser:argument "maybe-fourth"
|
parser:argument "maybe-fourth"
|
||||||
:args "?"
|
:args "?"
|
||||||
parser:argument("others", "Optional. ")
|
parser:argument("others", "Optional.")
|
||||||
:args "*"
|
:args "*"
|
||||||
|
|
||||||
assert.equal([[
|
assert.equal([[
|
||||||
@@ -94,7 +94,7 @@ Options:
|
|||||||
:description [[
|
:description [[
|
||||||
Sets verbosity level.
|
Sets verbosity level.
|
||||||
-v: Report all warnings.
|
-v: Report all warnings.
|
||||||
-vv: Report all debugging information. ]]
|
-vv: Report all debugging information.]]
|
||||||
|
|
||||||
assert.equal([[
|
assert.equal([[
|
||||||
Usage: foo [-v] [-h]
|
Usage: foo [-v] [-h]
|
||||||
@@ -131,7 +131,7 @@ Options:
|
|||||||
parser:option "-p"
|
parser:option "-p"
|
||||||
:default "8080"
|
:default "8080"
|
||||||
:show_default(false)
|
:show_default(false)
|
||||||
:description "Port. "
|
:description "Port."
|
||||||
|
|
||||||
assert.equal([[
|
assert.equal([[
|
||||||
Usage: foo [-o <o>] [-p <p>] [-h]
|
Usage: foo [-o <o>] [-p <p>] [-h]
|
||||||
|
@@ -2,28 +2,28 @@
|
|||||||
local Parser = require "argparse"
|
local Parser = require "argparse"
|
||||||
|
|
||||||
local parser = Parser()
|
local parser = Parser()
|
||||||
:description "A testing program. "
|
:description "A testing program."
|
||||||
:require_command(false)
|
:require_command(false)
|
||||||
|
|
||||||
parser:argument "input"
|
parser:argument "input"
|
||||||
|
|
||||||
parser:flag "-v" "--verbose"
|
parser:flag "-v" "--verbose"
|
||||||
:description "Sets verbosity level. "
|
:description "Sets verbosity level."
|
||||||
:target "verbosity"
|
:target "verbosity"
|
||||||
:count "0-2"
|
:count "0-2"
|
||||||
|
|
||||||
local install = parser:command "install"
|
local install = parser:command "install"
|
||||||
:description "Install a rock. "
|
:description "Install a rock."
|
||||||
|
|
||||||
install:argument "rock"
|
install:argument "rock"
|
||||||
:description "Name of the rock. "
|
:description "Name of the rock."
|
||||||
|
|
||||||
install:argument "version"
|
install:argument "version"
|
||||||
:description "Version of the rock. "
|
:description "Version of the rock."
|
||||||
:args "?"
|
:args "?"
|
||||||
|
|
||||||
install:option "-f" "--from"
|
install:option "-f" "--from"
|
||||||
:description "Fetch the rock from this server. "
|
:description "Fetch the rock from this server."
|
||||||
:target "server"
|
:target "server"
|
||||||
|
|
||||||
parser:get_usage()
|
parser:get_usage()
|
||||||
|
Reference in New Issue
Block a user