tshort / Eyeball.jl

Object and type viewer for Julia
Other
140 stars 4 forks source link

add means to sort objects #28

Closed bjarthur closed 2 years ago

bjarthur commented 2 years ago

closes https://github.com/tshort/Eyeball.jl/issues/27

bjarthur commented 2 years ago

the help menu is not displayed after quitting from a sort:

julia> eye(Dict(1=>'a', 2=>'b', 3=>Dict(4=>'d', 5=>'e')))
[f] fields [d] docs [e] expand [m/M] methodswith [o] open [r] tree [s] show [S] Sort [t] typeof [z] summarize [q] quit
 >   : Dict{Int64, Any}  Dict{Int64, Any}(2=>'b', 3=>Dict(5=>'e', 4=>'d'), 1=>'a')
      2: Char  'b'
      3: Dict{Int64, Char}  Dict(5=>'e', 4=>'d')
       5: Char  'e'
       4: Char  'd'
      1: Char  'a'

Opening sort(``) ...

[f] fields [d] docs [e] expand [m/M] methodswith [o] open [r] tree [s] show [S] Sort [t] typeof [z] summarize [q] quit
 >   : OrderedDict{Int64, Any}  OrderedDict{Int64, Any}(1=>'a', 2=>'b', 3=>Dict(5=>'e', 4=>'d'))
      1: Char  'a'
 >   : Dict{Int64, Any}  Dict{Int64, Any}(2=>'b', 3=>Dict(5=>'e', 4=>'d'), 1=>'a')
      2: Char  'b'
      3: Dict{Int64, Char}  Dict(5=>'e', 4=>'d')
       5: Char  'e'
       4: Char  'd'
      1: Char  'a'
bjarthur commented 2 years ago

also, maybe it would be better to sort in-place, without opening a new tree at the current node?

tshort commented 2 years ago

Yeah, but in place is harder to implement.

bjarthur commented 2 years ago

what does 'O' do? i don't see any diff in output with 'o' for my simple test cases. and it's not documented. the code has All...

tshort commented 2 years ago

@bjarthur, this is good to go, right?

tshort commented 2 years ago

what does 'O' do? i don't see any diff in output with 'o' for my simple test cases. and it's not documented. the code has All...

Right now, it opens modules with names(y, all = true) (includes non-exported names defined in the module, deprecated names, and compiler-generated names). It could be extended to other types where you want to show more content.

bjarthur commented 2 years ago

yes, it's ready! and i just noticed O is doc'd in the readme, just not in the repl.

tshort commented 2 years ago

the help menu is not displayed after quitting from a sort:

This happens any time you open another view. I haven't looked into a fix.