Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Press v to toggle showing the value of the current field. #6

Merged
merged 3 commits into from
Apr 16, 2020

Conversation

NHDaly
Copy link
Owner

@NHDaly NHDaly commented Apr 16, 2020

Press v to toggle showing the value of the current field.

We retrieve the first line of show(eval(field_path)), terminating the Task after it's printed one line, so it doesn't hang if you try to print a very large object.

To achieve that termination, this PR also defines a small helper utility, WriteBlockingIO <: IO which blocks a task on printing each character, and throws an exception to that task when you close the IO.

Example:

————————————————————————————————————————————————————————————————————
Select a field to recurse into or  to ascend. [q]uit.

Commands: [J]ump to field path.  Toggle [V]alue.
Toggles: [v]alue of the current field.

(d.vals[7])::Tuple{Int64,Int64} => 16.0 B
0 Allocated Indexes:
  

————————————————————————————————————————————————————————————————————
Select a field to recurse into or  to ascend. [q]uit.

Commands: [J]ump to field path.  Toggle [V]alue.
Toggles: [v]alue of the current field.

(2, 3) => 16.0 B
0 Allocated Indexes:
  

@NHDaly NHDaly added the enhancement New feature or request label Apr 16, 2020
@NHDaly NHDaly mentioned this pull request Apr 16, 2020
5 tasks
@NHDaly NHDaly force-pushed the nhd-toggle_show_value branch 2 times, most recently from 9441df3 to 2ff1f7c Compare April 16, 2020 03:06
Example:
```julia
————————————————————————————————————————————————————————————————————
Select a field to recurse into or ↩ to ascend. [q]uit.

Commands: [J]ump to field path.  Toggle [V]alue.
Toggles: [v]alue of the current field.

(d.vals[7])::Tuple{Int64,Int64} => 16.0 B
0 Allocated Indexes:
 → ↩

————————————————————————————————————————————————————————————————————
Select a field to recurse into or ↩ to ascend. [q]uit.

Commands: [J]ump to field path.  Toggle [V]alue.
Toggles: [v]alue of the current field.

(2, 3) => 16.0 B
0 Allocated Indexes:
 → ↩
```
@NHDaly NHDaly merged commit e1a699a into master Apr 16, 2020
@NHDaly NHDaly deleted the nhd-toggle_show_value branch April 16, 2020 03:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant