diff options
| author | Hisham Muhammad <hisham@gobolinux.org> | 2018-04-20 10:42:16 -0300 |
|---|---|---|
| committer | Hisham Muhammad <hisham@gobolinux.org> | 2018-05-31 11:16:09 -0300 |
| commit | 3b92924922a21a996adb1312e50dcdf87d1f61f8 (patch) | |
| tree | 631467746693ecb375d790ca2bf1f840b5ad84b9 /src | |
| parent | 875238142b573e1bcb27dc15ddd4338084b187ba (diff) | |
| download | luarocks-3b92924922a21a996adb1312e50dcdf87d1f61f8.tar.gz luarocks-3b92924922a21a996adb1312e50dcdf87d1f61f8.tar.bz2 luarocks-3b92924922a21a996adb1312e50dcdf87d1f61f8.zip | |
list: show tree in list title when using --tree
Diffstat (limited to 'src')
| -rw-r--r-- | src/luarocks/cmd/list.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/luarocks/cmd/list.lua b/src/luarocks/cmd/list.lua index 102a08f0..5e5cfac8 100644 --- a/src/luarocks/cmd/list.lua +++ b/src/luarocks/cmd/list.lua | |||
| @@ -71,8 +71,10 @@ end | |||
| 71 | function list.command(flags, filter, version) | 71 | function list.command(flags, filter, version) |
| 72 | local query = queries.new(filter and filter:lower() or "", version, true) | 72 | local query = queries.new(filter and filter:lower() or "", version, true) |
| 73 | local trees = cfg.rocks_trees | 73 | local trees = cfg.rocks_trees |
| 74 | local title = "Rocks installed for Lua "..cfg.lua_version | ||
| 74 | if flags["tree"] then | 75 | if flags["tree"] then |
| 75 | trees = { flags["tree"] } | 76 | trees = { flags["tree"] } |
| 77 | title = title .. " in " .. flags["tree"] | ||
| 76 | end | 78 | end |
| 77 | 79 | ||
| 78 | if flags["outdated"] then | 80 | if flags["outdated"] then |
| @@ -86,7 +88,7 @@ function list.command(flags, filter, version) | |||
| 86 | util.warning(err) | 88 | util.warning(err) |
| 87 | end | 89 | end |
| 88 | end | 90 | end |
| 89 | util.title("Installed rocks for Lua "..cfg.lua_version..":", flags["porcelain"]) | 91 | util.title(title, flags["porcelain"]) |
| 90 | search.print_result_tree(results, flags["porcelain"]) | 92 | search.print_result_tree(results, flags["porcelain"]) |
| 91 | return true | 93 | return true |
| 92 | end | 94 | end |
