nushell/crates
Reilly Wood 3d340657b5
explore: adopt anyhow, support CustomValue, remove help system (#12692)
This PR:
1. Adds basic support for `CustomValue` to `explore`. Previously `open
foo.db | explore` didn't really work, now we "materialize" the whole
database to a `Value` before loading it
2. Adopts `anyhow` for error handling in `explore`. Previously we were
kind of rolling our own version of `anyhow` by shoving all errors into a
`std::io::Error`; I think this is much nicer. This was necessary because
as part of 1), collecting input is now fallible...
3. Removes a lot of `explore`'s fancy command help system.
- Previously each command (`:help`, `:try`, etc.) had a sophisticated
help system with examples etc... but this was not very visible to users.
You had to know to run `:help :try` or view a list of commands with
`:help :`
- As discussed previously, we eventually want to move to a less modal
approach for `explore`, without the Vim-like commands. And so I don't
think it's worth keeping this command help system around (it's
intertwined with other stuff, and making these changes would have been
harder if keeping it).
4. Rename the `--reverse` flag to `--tail`. The flag scrolls to the end
of the data, which IMO is described better by "tail"
5. Does some renaming+commenting to clear up things I found difficult to
understand when navigating the `explore` code


I initially thought 1) would be just a few lines, and then this PR blew
up into much more extensive changes 😅


## Before
The whole database was being displayed as a single Nuon/JSON line 🤔 

![image](https://github.com/nushell/nushell/assets/26268125/6383f43b-fdff-48b4-9604-398438ad1499)


## After
The database gets displayed like a record

![image](https://github.com/nushell/nushell/assets/26268125/2f00ed7b-a3c4-47f4-a08c-98d07efc7bb4)


## Future work

It is sort of annoying that we have to load a whole SQLite database into
memory to make this work; it will be impractical for large databases.
I'd like to explore improvements to `CustomValue` that can make this
work more efficiently.
2024-05-01 17:34:37 -05:00
..
nu-cli Bump version to 0.93.1 (#12710) 2024-05-01 17:19:20 -05:00
nu-cmd-base Bump version to 0.93.1 (#12710) 2024-05-01 17:19:20 -05:00
nu-cmd-dataframe Bump version to 0.93.1 (#12710) 2024-05-01 17:19:20 -05:00
nu-cmd-extra Bump version to 0.93.1 (#12710) 2024-05-01 17:19:20 -05:00
nu-cmd-lang Bump version to 0.93.1 (#12710) 2024-05-01 17:19:20 -05:00
nu-cmd-plugin Bump version to 0.93.1 (#12710) 2024-05-01 17:19:20 -05:00
nu-color-config Bump version to 0.93.1 (#12710) 2024-05-01 17:19:20 -05:00
nu-command Make bytes build accept integer values as individual bytes (#12685) 2024-05-01 17:29:33 -05:00
nu-engine Change environment variables to be case-preserving (#12701) 2024-05-01 17:22:34 -05:00
nu-explore explore: adopt anyhow, support CustomValue, remove help system (#12692) 2024-05-01 17:34:37 -05:00
nu-glob Bump version to 0.93.1 (#12710) 2024-05-01 17:19:20 -05:00
nu-json Bump version to 0.93.1 (#12710) 2024-05-01 17:19:20 -05:00
nu-lsp Bump version to 0.93.1 (#12710) 2024-05-01 17:19:20 -05:00
nu-parser Bump version to 0.93.1 (#12710) 2024-05-01 17:19:20 -05:00
nu-path Path expansion no longer removes trailing slashes (#12662) 2024-05-01 17:28:54 -05:00
nu-plugin Bump version to 0.93.1 (#12710) 2024-05-01 17:19:20 -05:00
nu-plugin-core Bump version to 0.93.1 (#12710) 2024-05-01 17:19:20 -05:00
nu-plugin-engine Bump version to 0.93.1 (#12710) 2024-05-01 17:19:20 -05:00
nu-plugin-protocol Bump version to 0.93.1 (#12710) 2024-05-01 17:19:20 -05:00
nu-plugin-test-support Bump version to 0.93.1 (#12710) 2024-05-01 17:19:20 -05:00
nu-pretty-hex Bump version to 0.93.1 (#12710) 2024-05-01 17:19:20 -05:00
nu-protocol Change environment variables to be case-preserving (#12701) 2024-05-01 17:22:34 -05:00
nu-std Bump version to 0.93.1 (#12710) 2024-05-01 17:19:20 -05:00
nu-system Bump version to 0.93.1 (#12710) 2024-05-01 17:19:20 -05:00
nu-table Bump version to 0.93.1 (#12710) 2024-05-01 17:19:20 -05:00
nu-term-grid Bump version to 0.93.1 (#12710) 2024-05-01 17:19:20 -05:00
nu-test-support Bump version to 0.93.1 (#12710) 2024-05-01 17:19:20 -05:00
nu-utils Bump version to 0.93.1 (#12710) 2024-05-01 17:19:20 -05:00
nu_plugin_custom_values Bump version to 0.93.1 (#12710) 2024-05-01 17:19:20 -05:00
nu_plugin_example Bump version to 0.93.1 (#12710) 2024-05-01 17:19:20 -05:00
nu_plugin_formats Bump version to 0.93.1 (#12710) 2024-05-01 17:19:20 -05:00
nu_plugin_gstat Bump version to 0.93.1 (#12710) 2024-05-01 17:19:20 -05:00
nu_plugin_inc Bump version to 0.93.1 (#12710) 2024-05-01 17:19:20 -05:00
nu_plugin_nu_example Bump version to 0.93.1 (#12710) 2024-05-01 17:19:20 -05:00
nu_plugin_polars Bump version to 0.93.1 (#12710) 2024-05-01 17:19:20 -05:00
nu_plugin_python Bump version to 0.93.1 (#12710) 2024-05-01 17:19:20 -05:00
nu_plugin_query Bump version to 0.93.1 (#12710) 2024-05-01 17:19:20 -05:00
nu_plugin_stress_internals Bump version to 0.93.1 (#12710) 2024-05-01 17:19:20 -05:00
nuon Bump version to 0.93.1 (#12710) 2024-05-01 17:19:20 -05:00
README.md Remove old nushell/merge engine-q 2022-02-07 14:54:06 -05:00

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.