nushell/crates
WMR 0c888486c9
Add custom datetime format through strftime strings (#9500)
- improves usability of datetime's in displayed text
- 
# Description
Creates a config point for specifying long / short date time formats.
Defaults to humanized as we have today.

Provides for adding strftime formats into config.nu such as:
```nu
  datetime_format: {
    normal: "%Y-%m-%d %H:%M:%S"
    table: "%Y-%m-%d"
  }
```

Example:
```bash
> $env.config.datetime_format                                                                                                                         
┏━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ normal ┃ %a, %d %b %Y %H:%M:%S %z ┃
┃ table  ┃ %m/%d/%y %I:%M:%S%p      ┃
┗━━━━━━━━┻━━━━━━━━━━━━━━━━━━━━━━━━━━┛
> let a = (date now)                                                                                                                                  
> echo $a                                                                                                                                             
Thu, 22 Jun 2023 10:21:23 -0700
> echo [$a]                                                                                                                                           
┏━━━┳━━━━━━━━━━━━━━━━━━━━━┓
┃ 0 ┃ 06/22/23 10:21:23AM ┃
┗━━━┻━━━━━━━━━━━━━━━━━━━━━┛
```

# User-Facing Changes
Any place converting a datetime to a user displayed value should be
impacted.

# Tests + Formatting

- `cargo fmt --all -- --check` Done
- `cargo clippy --workspace -- -D warnings -D clippy::unwrap_used -A
clippy::needless_collect -A clippy::result_large_err` Done
- `cargo test --workspace` Done 
- `cargo run -- crates/nu-std/tests/run.nu` Not done - doesn't seem to
work

```bash
> use toolkit.nu  # or use an `env_change` hook to activate it automatically
> toolkit check pr
``` - Done

---------

Co-authored-by: Darren Schroeder <343840+fdncred@users.noreply.github.com>
Co-authored-by: Antoine Stevan <44101798+amtoine@users.noreply.github.com>
2023-06-23 15:05:04 -05:00
..
nu_plugin_custom_values Bump to 0.81.1 as development version (#9379) 2023-06-07 15:06:42 +02:00
nu_plugin_example Bump to 0.81.1 as development version (#9379) 2023-06-07 15:06:42 +02:00
nu_plugin_formats update ini dependency (#9426) 2023-06-13 13:33:00 -05:00
nu_plugin_gstat Bump to 0.81.1 as development version (#9379) 2023-06-07 15:06:42 +02:00
nu_plugin_inc Bump to 0.81.1 as development version (#9379) 2023-06-07 15:06:42 +02:00
nu_plugin_python update nu_plugin_python due to signature changes (#8107) 2023-02-18 13:27:24 +00:00
nu_plugin_query revert: move to ahash (#9464) 2023-06-18 15:27:57 +12:00
nu-cli cratification: move the bytes command to nu-cmd-extra (#9509) 2023-06-23 12:23:08 -07:00
nu-cmd-base cratification: move the bytes command to nu-cmd-extra (#9509) 2023-06-23 12:23:08 -07:00
nu-cmd-dataframe revert: move to ahash (#9464) 2023-06-18 15:27:57 +12:00
nu-cmd-extra cratification: move the bytes command to nu-cmd-extra (#9509) 2023-06-23 12:23:08 -07:00
nu-cmd-lang split $nu variable into scope commands and simpler $nu (#9487) 2023-06-21 09:33:01 +12:00
nu-color-config revert: move to ahash (#9464) 2023-06-18 15:27:57 +12:00
nu-command cratification: move the bytes command to nu-cmd-extra (#9509) 2023-06-23 12:23:08 -07:00
nu-engine split $nu variable into scope commands and simpler $nu (#9487) 2023-06-21 09:33:01 +12:00
nu-explore nu-table/ Fix indexing issue for table --expand (#9484) 2023-06-20 20:27:00 +12:00
nu-glob Bump to 0.81.1 as development version (#9379) 2023-06-07 15:06:42 +02:00
nu-json Apply nightly clippy fixes (#9482) 2023-06-20 10:17:33 +02:00
nu-parser revert: move to ahash (#9464) 2023-06-18 15:27:57 +12:00
nu-path make *dots* tests easier to read (#9467) 2023-06-20 20:28:10 +12:00
nu-plugin revert: move to ahash (#9464) 2023-06-18 15:27:57 +12:00
nu-pretty-hex Bump to 0.81.1 as development version (#9379) 2023-06-07 15:06:42 +02:00
nu-protocol Add custom datetime format through strftime strings (#9500) 2023-06-23 15:05:04 -05:00
nu-std split $nu variable into scope commands and simpler $nu (#9487) 2023-06-21 09:33:01 +12:00
nu-system Bump once_cell from 1.17.1 to 1.18.0 (#9474) 2023-06-19 06:16:00 +00:00
nu-table nu-table/ Fix indexing issue for table --expand (#9484) 2023-06-20 20:27:00 +12:00
nu-term-grid Bump to 0.81.1 as development version (#9379) 2023-06-07 15:06:42 +02:00
nu-test-support Bump to 0.81.1 as development version (#9379) 2023-06-07 15:06:42 +02:00
nu-utils Add custom datetime format through strftime strings (#9500) 2023-06-23 15:05:04 -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.