Skip to content

Commit

Permalink
lua: shorten block_tostr output
Browse files Browse the repository at this point in the history
Use block_pp if you really want the details.

Signed-off-by: Markus Klotzbuecher <mk@mkio.de>
  • Loading branch information
kmarkus committed Jun 10, 2020
1 parent 2a900cd commit ccc2057
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions lua/ubx.lua
Original file line number Diff line number Diff line change
Expand Up @@ -628,16 +628,7 @@ function M.block_tostr(b)
bt = b
end

if bt.prototype==false then
return ("%s [%s]"):format(green(bt.name), bt.block_type)
end

return ("%s [%s, %s, %s, attrs: %s]"):format(
green(bt.name),
bt.block_type,
block_state_color(bt.state),
blue(bt.prototype),
table.concat(bt.attrs, ', '))
return ("%s [%s]"):format(green(bt.name), bt.prototype or "proto")
end

function M.block_port_get (b, n)
Expand Down

0 comments on commit ccc2057

Please sign in to comment.