* add a new welcome banner to nushell
* remove top line
* tweaked colors and wording
* changed to dimmed white
* removed a comment
* make config nu stand out a little
* fix type-o
* Skeleton implementation
Lots and lots of TODOs
* Bootstrap simple CustomValue plugin support test
* Create nu_plugin_custom_value
* Skeleton for nu_plugin_custom_values
* Return a custom value from plugin
* Encode CustomValues from plugin calls as PluginResponse::PluginData
* Add new PluginCall variant CollapseCustomValue
* Handle CollapseCustomValue plugin calls
* Add CallInput::Data variant to CallInfo inputs
* Handle CallInfo with CallInput::Data plugin calls
* Send CallInput::Data if Value is PluginCustomValue from plugin calls
* Remove unnecessary boxing of plugins CallInfo
* Add fields needed to collapse PluginCustomValue to it
* Document PluginCustomValue and its purpose
* Impl collapsing using plugin calls in PluginCustomValue::to_base_value
* Implement proper typetag based deserialization for CoolCustomValue
* Test demonstrating that passing back a custom value to plugin works
* Added a failing test for describing plugin CustomValues
* Support describe for PluginCustomValues
- Add name to PluginResponse::PluginData
- Also turn it into a struct for clarity
- Add name to PluginCustomValue
- Return name field from PluginCustomValue
* Demonstrate that plugins can create and handle multiple CustomValues
* Add bincode to nu-plugin dependencies
This is for demonstration purposes, any schemaless binary seralization
format will work. I picked bincode since it's the most popular for Rust
but there are defintely better options out there for this usecase
* serde_json::Value -> Vec<u8>
* Update capnp schema for new CallInfo.input field
* Move call_input capnp serialization and deserialization into new file
* Deserialize Value's span from Value itself instead of passing call.head
I am not sure if this was correct and I am breaking it or if it was a
bug, I don't fully understand how nu creates and uses Spans. What should
reuse spans and what should recreate new ones?
But yeah it felt weird that the Value's Span was being ignored since in
the json serializer just uses the Value's Span
* Add call_info value round trip test
* Add capnp CallInput::Data serialization and deserialization support
* Add CallInfo::CollapseCustomValue to capnp schema
* Add capnp PluginCall::CollapseCustomValue serialization and deserialization support
* Add PluginResponse::PluginData to capnp schema
* Add capnp PluginResponse::PluginData serialization and deserialization support
* Switch plugins::custom_values tests to capnp
Both json and capnp would work now! Sadly I can't choose both at the
same time :(
* Add missing JsonSerializer round trip tests
* Handle plugin returning PluginData as a response to CollapseCustomValue
* Refactor plugin calling into a reusable function
Many less levels of indentation now!
* Export PluginData from nu_plugin
So plugins can create their very own serve_plugin with whatever
CustomValue behavior they may desire
* Error if CustomValue cannot be handled by Plugin
* nu-table: Refactoring
Signed-off-by: Maxim Zhiburt <zhiburt@gmail.com>
* nu-table: consider space for single `...` column not enough space
Signed-off-by: Maxim Zhiburt <zhiburt@gmail.com>
* nu-table: Fix header style
It did appeared again after my small change...
Signed-off-by: Maxim Zhiburt <zhiburt@gmail.com>
* nu-table: Add a empty header style test
Signed-off-by: Maxim Zhiburt <zhiburt@gmail.com>
* Return error when external command core dumped
Fixes#5903
Signed-off-by: nibon7 <nibon7@163.com>
* Use signal-hook to get signal name
Signed-off-by: nibon7 <nibon7@163.com>
* Fix comment
Signed-off-by: nibon7 <nibon7@163.com>
* feat: deprecate `hash base64` command
* feat: extend `decode` and `encode` command families
This commit
- Adds `encode` command family
- Backports `hash base64` features to `encode base64` and `decode base64` subcommands.
- Refactors code a bit and extends tests for encodings
- `decode base64` returns a binary `Value` (that may be decoded into a string using `decode` command)
* feat: add `--binary(-b)` flag to `decode base64`
Default output type is now string, but binary can be requested using this new flag.
This PR adds support for an SQLite history via nushell/reedline#401
The SQLite history is enabled by setting history_file_format: "sqlite" in config.nu.
* somewhat working sqlite history
* Hook up history command
* Fix error in SQlitebacked with empty lines
When entering an empty line there previously was the "No command run"
error with `SqliteBackedHistory` during addition of the metadata
May be considered a temporary fix
Co-authored-by: sholderbach <sholderbach@users.noreply.github.com>
* Fix `ls` for Windows system files
* Fix non-Windows builds
* Make Clippy happy on non-Windows platforms
* Fix new test on GitHub runners
* Move ls Windows code into its own module