nushell/crates
Maxim Zhiburt 7cfd4d2cfa
nu-table: Add table option --abbreviated (#10399)
- Added `--abbreviated`/`-a` option
- Adedd `abbreviate_if_longer_than` config opt for it.

```nu
ls | table -a 3
```

```
╭───┬────────────────────┬──────┬───────────┬──────────────╮
│ # │        name        │ type │   size    │   modified   │
├───┼────────────────────┼──────┼───────────┼──────────────┤
│ 0 │ CODE_OF_CONDUCT.md │ file │   3.4 KiB │ 4 days ago   │
│ 1 │ CONTRIBUTING.md    │ file │  18.3 KiB │ 2 weeks ago  │
│ 2 │ Cargo.lock         │ file │ 144.3 KiB │ 15 hours ago │
│ 3 │ ...                │ ...  │ ...       │ ...          │
│ 4 │ tests              │ dir  │   4.0 KiB │ 4 months ago │
│ 5 │ toolkit.nu         │ file │  14.6 KiB │ 5 days ago   │
│ 6 │ wix                │ dir  │   4.0 KiB │ 2 months ago │
╰───┴────────────────────┴──────┴───────────┴──────────────╯
```

```nu
$env | table -a 3
```

```
╭──────────────────┬──────────────────────────────────────────────────────────────────────────╮
│ BROWSER          │ firefox                                                                  │
│ CARGO            │ /home/maxim/.rustup/toolchains/1.70.0-x86_64-unknown-linux-gnu/bin/cargo │
│ CARGO_HOME       │ /home/maxim/.cargo                                                       │
│ ...              │ ...                                                                      │
│ XDG_SESSION_TYPE │ x11                                                                      │
│ XDG_VTNR         │ 7                                                                        │
│ _                │ /home/maxim/.cargo/bin/cargo                                             │
╰──────────────────┴──────────────────────────────────────────────────────────────────────────╯
```

close #10393

PS: Maybe as a separate issue (good candidate for `GOOD FIRST ISSUE`)
add a config option to change a default `...` truncation sign to a
custom? (which would be applicable not only for `--abbreviated` but all
kind of tables)

---------

Co-authored-by: Darren Schroeder <343840+fdncred@users.noreply.github.com>
2023-09-20 12:59:08 -05:00
..
nu_plugin_custom_values Bump to 0.85.1 development version (#10431) 2023-09-20 18:38:42 +12:00
nu_plugin_example Bump to 0.85.1 development version (#10431) 2023-09-20 18:38:42 +12:00
nu_plugin_formats Bump to 0.85.1 development version (#10431) 2023-09-20 18:38:42 +12:00
nu_plugin_gstat Bump to 0.85.1 development version (#10431) 2023-09-20 18:38:42 +12:00
nu_plugin_inc Bump to 0.85.1 development version (#10431) 2023-09-20 18:38:42 +12:00
nu_plugin_python remove vectorize_over_list from python plugin (#9905) 2023-08-03 16:46:48 +02:00
nu_plugin_query Bump to 0.85.1 development version (#10431) 2023-09-20 18:38:42 +12:00
nu-cli Bump to 0.85.1 development version (#10431) 2023-09-20 18:38:42 +12:00
nu-cmd-base Bump to 0.85.1 development version (#10431) 2023-09-20 18:38:42 +12:00
nu-cmd-dataframe Bump to 0.85.1 development version (#10431) 2023-09-20 18:38:42 +12:00
nu-cmd-extra Bump to 0.85.1 development version (#10431) 2023-09-20 18:38:42 +12:00
nu-cmd-lang Bump to 0.85.1 development version (#10431) 2023-09-20 18:38:42 +12:00
nu-color-config Bump to 0.85.1 development version (#10431) 2023-09-20 18:38:42 +12:00
nu-command nu-table: Add table option --abbreviated (#10399) 2023-09-20 12:59:08 -05:00
nu-engine Bump to 0.85.1 development version (#10431) 2023-09-20 18:38:42 +12:00
nu-explore Bump to 0.85.1 development version (#10431) 2023-09-20 18:38:42 +12:00
nu-glob Bump to 0.85.1 development version (#10431) 2023-09-20 18:38:42 +12:00
nu-json Bump to 0.85.1 development version (#10431) 2023-09-20 18:38:42 +12:00
nu-parser don't overrite arg's type if it's annotated explicitly (#10424) 2023-09-21 03:58:29 +12:00
nu-path Fix tilde-expansion for multi-byte unicode chars (#10434) 2023-09-21 04:04:28 +12:00
nu-plugin Bump to 0.85.1 development version (#10431) 2023-09-20 18:38:42 +12:00
nu-pretty-hex Bump to 0.85.1 development version (#10431) 2023-09-20 18:38:42 +12:00
nu-protocol nu-table: Add table option --abbreviated (#10399) 2023-09-20 12:59:08 -05:00
nu-std Bump to 0.85.1 development version (#10431) 2023-09-20 18:38:42 +12:00
nu-system Bump to 0.85.1 development version (#10431) 2023-09-20 18:38:42 +12:00
nu-table Bump to 0.85.1 development version (#10431) 2023-09-20 18:38:42 +12:00
nu-term-grid Bump to 0.85.1 development version (#10431) 2023-09-20 18:38:42 +12:00
nu-test-support Bump to 0.85.1 development version (#10431) 2023-09-20 18:38:42 +12:00
nu-utils nu-table: Add table option --abbreviated (#10399) 2023-09-20 12:59:08 -05:00
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.