nushell/crates
WindSoilder 5d98a727ca
Deprecate --flag: bool in custom command (#11365)
# Description
While #11057 is merged, it's hard to tell the difference between
`--flag: bool` and `--flag`, and it makes user hard to read custom
commands' signature, and hard to use them correctly.

After discussion, I think we can deprecate `--flag: bool` usage, and
encourage using `--flag` instead.

# User-Facing Changes
The following code will raise warning message, but don't stop from
running.
```nushell
❯ def florb [--dry-run: bool, --another-flag] { "aaa" };  florb
Error:   × Deprecated: --flag: bool
   ╭─[entry #7:1:1]
 1 │ def florb [--dry-run: bool, --another-flag] { "aaa" };  florb
   ·                       ──┬─
   ·                         ╰── `--flag: bool` is deprecated. Please use `--flag` instead, more info: https://www.nushell.sh/book/custom_commands.html
   ╰────

aaa
```

cc @kubouch 

# Tests + Formatting
Done

# After Submitting
- [ ] Add more information under
https://www.nushell.sh/book/custom_commands.html to indicate `--dry-run:
bool` is not allowed,
- [ ] remove `: bool` from custom commands between 0.89 and 0.90

---------

Co-authored-by: Antoine Stevan <44101798+amtoine@users.noreply.github.com>
2023-12-21 10:07:08 +01:00
..
nu_plugin_custom_values Bump version to 0.88.2 (#11333) 2023-12-14 13:55:48 -06:00
nu_plugin_example Bump version to 0.88.2 (#11333) 2023-12-14 13:55:48 -06:00
nu_plugin_formats Bump version to 0.88.2 (#11333) 2023-12-14 13:55:48 -06:00
nu_plugin_gstat Bump version to 0.88.2 (#11333) 2023-12-14 13:55:48 -06:00
nu_plugin_inc Bump version to 0.88.2 (#11333) 2023-12-14 13:55:48 -06:00
nu_plugin_python remove vectorize_over_list from python plugin (#9905) 2023-08-03 16:46:48 +02:00
nu_plugin_query Bump version to 0.88.2 (#11333) 2023-12-14 13:55:48 -06:00
nu-cli Deprecate --flag: bool in custom command (#11365) 2023-12-21 10:07:08 +01:00
nu-cmd-base Bump version to 0.88.2 (#11333) 2023-12-14 13:55:48 -06:00
nu-cmd-dataframe Polars Struct support without unsafe blocks (#11229) 2023-12-15 11:21:30 +01:00
nu-cmd-extra Rename extra's format to format pattern (#11355) 2023-12-17 17:32:34 -06:00
nu-cmd-lang Bump itertools from 0.11.0 to 0.12.0 (#11360) 2023-12-20 22:58:07 +08:00
nu-color-config Remove Value::MatchPattern (#11356) 2023-12-18 07:25:34 +13:00
nu-command 📝 Update str trim CLI help doc (#11383) 2023-12-20 14:23:41 -06:00
nu-engine Bump version to 0.88.2 (#11333) 2023-12-14 13:55:48 -06:00
nu-explore Bump version to 0.88.2 (#11333) 2023-12-14 13:55:48 -06:00
nu-glob Bump version to 0.88.2 (#11333) 2023-12-14 13:55:48 -06:00
nu-json Bump version to 0.88.2 (#11333) 2023-12-14 13:55:48 -06:00
nu-lsp Make hover equal to help command (#11320) 2023-12-15 11:39:19 -06:00
nu-parser Deprecate --flag: bool in custom command (#11365) 2023-12-21 10:07:08 +01:00
nu-path Bump version to 0.88.2 (#11333) 2023-12-14 13:55:48 -06:00
nu-plugin Bump version to 0.88.2 (#11333) 2023-12-14 13:55:48 -06:00
nu-pretty-hex Bump version to 0.88.2 (#11333) 2023-12-14 13:55:48 -06:00
nu-protocol Deprecate --flag: bool in custom command (#11365) 2023-12-21 10:07:08 +01:00
nu-std disable directory submodule auto export (#11157) 2023-12-15 12:37:55 +01:00
nu-system Bump version to 0.88.2 (#11333) 2023-12-14 13:55:48 -06:00
nu-table Bump version to 0.88.2 (#11333) 2023-12-14 13:55:48 -06:00
nu-term-grid Bump version to 0.88.2 (#11333) 2023-12-14 13:55:48 -06:00
nu-test-support Bump version to 0.88.2 (#11333) 2023-12-14 13:55:48 -06:00
nu-utils add special emoji handling for debug --raw (#11368) 2023-12-19 13:09:31 -06: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.