Closed bazhenov closed 2 years ago
Thanks! I think it would actually make sense to just save the table created in table::print_table
into the env for this. That would happen here: https://github.com/databricks/click/blob/master/src/command/mod.rs#L250
So table::print_table
would return the created table, and then set_last_objs
could take an Option<Table>
and save it.
I think this command will be much more useful if it can just reprint the whole table.
There are a couple places where we don't create a whole table (like in crd.rs). For now we can just pass None
for the table and fall back to what you're doing here.
Yes, indeed. I'm working on it.
Ок, now KObj
formatting rules are preserved
table::print_table()
returns Table
;Env.set_last_objs()
accepts Option<Table>
as 2nd argument. clear_last_objs()
clears both.
Implementation of
last
command according to #204.Implementation is based on
range
command and at the moment is not respectingKObj
type. So for example if query isjobs
The
last
command will printIt's possible to preserve
CellSpec
, although it's will be much more intrusive from the perspective ofEnv
struct.