Home Explore Blog CI



nushell

14th chunk of `blog/2022-03-22-nushell_0_60.md`
04c5fcc1a15993cdbe0399645b6baec3a67b2dbaa95768530000000100000816


## New Keybindings

Now you can define complex keybindings for nushell. For example, say you have changed your config file and
want to reload it in your nushell session. You can create a special keybinding to help reload your config file:

```
{
    name: reload_config
    modifier: none
    keycode: f5
    mode: emacs
    event: {
      send: executehostcommand,
      cmd: $"source '($nu.config-path)'"
    }
}
```

with this keybinding every time you press F5 your config file is sourced and ready to go. Neat!

# Introducing 'nuon'

As the syntax for Nushell has continued to grow and evolve, we noticed that writing data in Nushell was kinda fun. The more we played with it, the more the idea grew that we could create a data file format using the Nushell syntax for data. Thus, 'nuon' was born. With it, we now include `from nuon` and `to nuon` to help you work with the new .nuon files.

Nuon is a superset of JSON, allowing you to pass JSON files and parse them as Nuon. Additionally, Nuon supports the data forms from Nushell, including compact tables, durations, filesizes, and more.

```
# sample.nuon
[
    # The nuon compact table format
    [[a, nuon, table]; [1, 2, 3], [4, 5, 6]],

    # A filesize
    100kib,

    # A duration
    100sec,

    # A date
    2022-01-11,

    # A boolean
    true,

    # A record
    {name: "Bobby", age: 99},

    # Binary data
    0x[11, ff, ee, 1f]
]
```

Nuon is still experimental, but we're already enjoying using it and are eager to continue to improve on it.

# Smaller release size

The 0.60 release is significantly smaller than the previous 0.44 release.

| release file for 0.44.0 | size    |
| ----------------------- | ------- |
| nu_0_44_0_linux.tar.gz  | 103 MB  |
| nu_0_44_0_macOS.zip     | 79.7 MB |
| nu_0_44_0_windows.msi   | 55.5 MB |
| nu_0_44_0_windows.zip   | 57.9 MB |

| release file for 0.60.0 | size    |
| ----------------------- | ------- |
| nu_0_60_0_linux.tar.gz  | 14.8 MB |
| nu_0_60_0_macOS.zip     | 12.9 MB |

Title: Nushell Updates: New Keybindings, 'nuon' Data Format, and Smaller Release Size
Summary
The update introduces custom keybindings for tasks like reloading config files with a simple F5 press. It also unveils 'nuon', a Nushell-syntax-based data format superseding JSON and supporting advanced data types. Notably, the 0.60 release boasts a significantly smaller file size compared to previous versions.