diff options
author | Paul Ouellette <oue.paul18@gmail.com> | 2019-08-16 12:52:13 -0400 |
---|---|---|
committer | Paul Ouellette <oue.paul18@gmail.com> | 2019-08-17 00:56:37 -0400 |
commit | 4a4299763ece819ce306ed2903c5ac90fd7ecc11 (patch) | |
tree | fb33df3c39ecd56365ff7abbb79e65d84242e729 | |
parent | 6a751c541814534015e4b8b651f71332d293ace1 (diff) | |
download | luarocks-4a4299763ece819ce306ed2903c5ac90fd7ecc11.tar.gz luarocks-4a4299763ece819ce306ed2903c5ac90fd7ecc11.tar.bz2 luarocks-4a4299763ece819ce306ed2903c5ac90fd7ecc11.zip |
Allow using - or _ in commands
-rw-r--r-- | src/luarocks/admin/cmd/make_manifest.lua | 1 | ||||
-rw-r--r-- | src/luarocks/admin/cmd/refresh_cache.lua | 1 | ||||
-rw-r--r-- | src/luarocks/cmd/new_version.lua | 2 | ||||
-rw-r--r-- | src/luarocks/cmd/write_rockspec.lua | 2 |
4 files changed, 6 insertions, 0 deletions
diff --git a/src/luarocks/admin/cmd/make_manifest.lua b/src/luarocks/admin/cmd/make_manifest.lua index b4f2ca5b..ab940f9e 100644 --- a/src/luarocks/admin/cmd/make_manifest.lua +++ b/src/luarocks/admin/cmd/make_manifest.lua | |||
@@ -13,6 +13,7 @@ local dir = require("luarocks.dir") | |||
13 | 13 | ||
14 | function make_manifest.add_to_parser(parser) | 14 | function make_manifest.add_to_parser(parser) |
15 | local cmd = parser:command("make_manifest", "Compile a manifest file for a repository.", util.see_also()) | 15 | local cmd = parser:command("make_manifest", "Compile a manifest file for a repository.", util.see_also()) |
16 | parser:command("make-manifest"):hidden(true):action(function(args) args.command = "make_manifest" end) | ||
16 | 17 | ||
17 | cmd:argument("repository", "Local repository pathname.") | 18 | cmd:argument("repository", "Local repository pathname.") |
18 | :args("?") | 19 | :args("?") |
diff --git a/src/luarocks/admin/cmd/refresh_cache.lua b/src/luarocks/admin/cmd/refresh_cache.lua index 81959953..40c9ff09 100644 --- a/src/luarocks/admin/cmd/refresh_cache.lua +++ b/src/luarocks/admin/cmd/refresh_cache.lua | |||
@@ -8,6 +8,7 @@ local cache = require("luarocks.admin.cache") | |||
8 | 8 | ||
9 | function refresh_cache.add_to_parser(parser) | 9 | function refresh_cache.add_to_parser(parser) |
10 | local cmd = parser:command("refresh_cache", "Refresh local cache of a remote rocks server.", util.see_also()) | 10 | local cmd = parser:command("refresh_cache", "Refresh local cache of a remote rocks server.", util.see_also()) |
11 | parser:command("refresh-cache"):hidden(true):action(function(args) args.command = "refresh_cache" end) | ||
11 | 12 | ||
12 | cmd:option("--from", "The server to use. If not given, the default server ".. | 13 | cmd:option("--from", "The server to use. If not given, the default server ".. |
13 | "set in the upload_server variable from the configuration file is used instead.") | 14 | "set in the upload_server variable from the configuration file is used instead.") |
diff --git a/src/luarocks/cmd/new_version.lua b/src/luarocks/cmd/new_version.lua index 71d763f8..1aecec95 100644 --- a/src/luarocks/cmd/new_version.lua +++ b/src/luarocks/cmd/new_version.lua | |||
@@ -40,6 +40,8 @@ WARNING: it writes the new rockspec to the given directory, | |||
40 | overwriting the file if it already exists.]], util.see_also()) | 40 | overwriting the file if it already exists.]], util.see_also()) |
41 | :summary("Auto-write a rockspec for a new version of a rock.") | 41 | :summary("Auto-write a rockspec for a new version of a rock.") |
42 | 42 | ||
43 | parser:command("new-version"):hidden(true):action(function(args) args.command = "new_version" end) | ||
44 | |||
43 | cmd:argument("rock", "Package name or rockspec.") | 45 | cmd:argument("rock", "Package name or rockspec.") |
44 | :args("?") | 46 | :args("?") |
45 | cmd:argument("new_version", "New version of the rock.") | 47 | cmd:argument("new_version", "New version of the rock.") |
diff --git a/src/luarocks/cmd/write_rockspec.lua b/src/luarocks/cmd/write_rockspec.lua index 4ab0e534..ee825ce4 100644 --- a/src/luarocks/cmd/write_rockspec.lua +++ b/src/luarocks/cmd/write_rockspec.lua | |||
@@ -63,6 +63,8 @@ Note that the generated file is a _starting point_ for writing a | |||
63 | rockspec, and is not guaranteed to be complete or correct. ]], util.see_also()) | 63 | rockspec, and is not guaranteed to be complete or correct. ]], util.see_also()) |
64 | :summary("Write a template for a rockspec file.") | 64 | :summary("Write a template for a rockspec file.") |
65 | 65 | ||
66 | parser:command("write-rockspec"):hidden(true):action(function(args) args.command = "write_rockspec" end) | ||
67 | |||
66 | cmd:argument("name", "Name of the rock.") | 68 | cmd:argument("name", "Name of the rock.") |
67 | :args("?") | 69 | :args("?") |
68 | cmd:argument("version", "Rock version.") | 70 | cmd:argument("version", "Rock version.") |