mirror of
https://github.com/nushell/nushell.git
synced 2024-11-08 09:34:30 +01:00
bc437da5c7
fixes #10455 @KAAtheWiseGit, I'm sorry, I didn't mean to block your first PR #10461, didn't see you had submitted it till I got around to submitting this. If you want to incoporate useful ideas from this PR into yours, I do not mind deferring to you. # Description Changes made in `datetime-diff`: * Initialize millisecond and microsecond fields in `$current`, to fix the error when borrow needs to refer to them. * Fix `borrow_nanoseconds` to borrow from seconds, not from (unused) microseconds. * Added error check to insist that first argument is >= second argument. `datetime-diff` doesn't represent negative durations correctly (it tries to borrow out of the year, resulting in negative year and positive all other fields). We don't currently have a use case requiring negative durations. * Add comments so help is a bit clearer (I was surprised that the first argument, named `$from` was actually supposed to be the *later* datetime. The order of arguments is reasonable (reminiscent of <later> <minus> <earlier>), so I just changed the param name to match its purpose. Changes made in `pretty-print-duration`: * changed type of argument from `duration` to `record`. (it's not clear why Nu was not complaining about this!) * changed test for skipping a clause from `> 0` to `!= 0`. Even though `datetime-diff` won't present a negative field in the record, user might call `pretty-print-duration` with one, might as well handle it. (but I think `hour:-2` will be rendered as `-2hr`, not `-2hrs`...). * added help and an example. # User-Facing Changes none requiring code changes. # Tests + Formatting - 🟢 `toolkit fmt` - 🟢 `toolkit clippy` - 🟢 `toolkit test` - 🟢 `toolkit test stdlib` - - # After Submitting <!-- If your PR had any user-facing changes, update [the documentation](https://github.com/nushell/nushell.github.io) after the PR is merged, if necessary. This will help us keep the docs up to date. --> |
||
---|---|---|
.. | ||
nu_plugin_custom_values | ||
nu_plugin_example | ||
nu_plugin_formats | ||
nu_plugin_gstat | ||
nu_plugin_inc | ||
nu_plugin_python | ||
nu_plugin_query | ||
nu-cli | ||
nu-cmd-base | ||
nu-cmd-dataframe | ||
nu-cmd-extra | ||
nu-cmd-lang | ||
nu-color-config | ||
nu-command | ||
nu-engine | ||
nu-explore | ||
nu-glob | ||
nu-json | ||
nu-parser | ||
nu-path | ||
nu-plugin | ||
nu-pretty-hex | ||
nu-protocol | ||
nu-std | ||
nu-system | ||
nu-table | ||
nu-term-grid | ||
nu-test-support | ||
nu-utils | ||
README.md |
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.