From c0d695ad303b19602e3342f0bc371b8b1c73d2ae Mon Sep 17 00:00:00 2001 From: Ignacio Burgueño Date: Wed, 15 Jan 2014 18:09:23 -0800 Subject: show --modules will output one module per line As suggested by @agladysh in #210 So the output of, say, `luarocks show --modules oauth` will be: ~~~~ OAuth.helpers OAuth OAuth.coreLuaNode OAuth.coreLuaSocket ~~~~ instead of ~~~~ OAuth.helpers OAuth OAuth.coreLuaNode OAuth.coreLuaSocket ~~~~ --- src/luarocks/show.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/luarocks/show.lua b/src/luarocks/show.lua index 2e039dd4..3a765ef3 100644 --- a/src/luarocks/show.lua +++ b/src/luarocks/show.lua @@ -1,4 +1,3 @@ - --- Module implementing the LuaRocks "show" command. -- Shows information about an installed rock. module("luarocks.show", package.seeall) @@ -128,7 +127,7 @@ function run(...) if flags["rock-tree"] then util.printout(path.rocks_tree_to_string(repo)) elseif flags["rock-dir"] then util.printout(directory) elseif flags["home"] then util.printout(descript.homepage) - elseif flags["modules"] then util.printout(keys_as_string(minfo.modules)) + elseif flags["modules"] then util.printout(keys_as_string(minfo.modules), "\n") elseif flags["deps"] then util.printout(keys_as_string(minfo.dependencies)) elseif flags["rockspec"] then util.printout(rockspec_file) elseif flags["mversion"] then util.printout(version) -- cgit v1.2.3-55-g6feb From cb053191eca0191b330ff5ce1b99da9b04dba30a Mon Sep 17 00:00:00 2001 From: Ignacio Burgueño Date: Thu, 16 Jan 2014 01:16:18 -0800 Subject: Use \n as separator to keys_as_string --- src/luarocks/show.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/luarocks/show.lua b/src/luarocks/show.lua index 3a765ef3..49e235d9 100644 --- a/src/luarocks/show.lua +++ b/src/luarocks/show.lua @@ -127,7 +127,7 @@ function run(...) if flags["rock-tree"] then util.printout(path.rocks_tree_to_string(repo)) elseif flags["rock-dir"] then util.printout(directory) elseif flags["home"] then util.printout(descript.homepage) - elseif flags["modules"] then util.printout(keys_as_string(minfo.modules), "\n") + elseif flags["modules"] then util.printout(keys_as_string(minfo.modules, "\n")) elseif flags["deps"] then util.printout(keys_as_string(minfo.dependencies)) elseif flags["rockspec"] then util.printout(rockspec_file) elseif flags["mversion"] then util.printout(version) -- cgit v1.2.3-55-g6feb