mirror of
https://github.com/nushell/nushell.git
synced 2025-05-29 22:29:06 +02:00
`explore` has 3 cursor-related structs that are extensively used to track the currently shown "window" of the data being shown. I was finding the cursor code quite difficult to follow, so this PR: - rewrites the base `Cursor` struct from scratch, with some tests - makes big changes to `WindowCursor` - renames `XYCursor` to `WindowCursor2D` - makes some of the cursor functions fallible as a start towards better error handling - changes lots of function names to things that I find more intuitive - adds comments, including ASCII diagrams to explain how the cursors work More work could be done (I'd like to review/change more function names in `WindowCursor` and `WindowCursor2D` and add more tests), but this is the limit of what I can get done in a weekend. I think this part of the code is in a better place now. # Testing performed I did a lot of manual testing in the record view and binary viewer, moving around with arrow keys / page up+down / home+end. This can definitely wait until after the release freeze, this area has very few automated tests and it'd be good to let the changes bake a bit.
Nushell core libraries and plugins
These sub-crates form both the foundation for Nu and a set of plugins which extend Nu with additional functionality.
Foundational libraries are split into two kinds of crates:
- Core crates - those crates that work together to build the Nushell language engine
- Support crates - a set of crates that support the engine with additional features like JSON support, ANSI support, and more.
Plugins are likewise also split into two types:
- Core plugins - plugins that provide part of the default experience of Nu, including access to the system properties, processes, and web-connectivity features.
- Extra plugins - these plugins run a wide range of different capabilities like working with different file types, charting, viewing binary data, and more.