nushell/crates
Maria José Solano 1d68c48a92
Allow arguments for the last flag in short flag batch (#8808)
# Description
_Fixes #5923_

Currently `nushell` doesn't allow short flag batches to contain
arguments, despite this being a common pattern in commands like `git
commit -am 'My commit message'`. This PR relaxes this so that the last
flag in the batch can take an argument.

# User-Facing Changes
- `nu::parser::short_flag_arg_cant_take_arg` has been replaced by
`nu::parser::only_last_flag_in_batch_can_take_arg` and is displayed when
a flag other then the last in a short flag batch takes an argument.

# Tests + Formatting
- Both
[`test_parser.rs`](48af0ebc3c/crates/nu-parser/tests/test_parser.rs (L640-L704))
and
[`test_known_external.rs`](48af0ebc3c/src/tests/test_known_external.rs (L42-L61))
have been updated to test the new allowed and disallowed scenarios.

---------

Co-authored-by: sholderbach <sholderbach@users.noreply.github.com>
2023-04-15 10:24:51 +02:00
..
nu_plugin_custom_values Bump to 0.78.1 development version (#8741) 2023-04-05 13:36:10 +12:00
nu_plugin_example Bump to 0.78.1 development version (#8741) 2023-04-05 13:36:10 +12:00
nu_plugin_formats Bump to 0.78.1 development version (#8741) 2023-04-05 13:36:10 +12:00
nu_plugin_gstat Bump git2 from 0.16.1 to 0.17.0 (#8722) 2023-04-05 19:20:58 +00:00
nu_plugin_inc Bump to 0.78.1 development version (#8741) 2023-04-05 13:36:10 +12:00
nu_plugin_python update nu_plugin_python due to signature changes (#8107) 2023-02-18 13:27:24 +00:00
nu_plugin_query Bump to 0.78.1 development version (#8741) 2023-04-05 13:36:10 +12:00
nu-cli Change NU_LIB_DIRS not to depend on $nu.config-path (#8887) 2023-04-14 23:16:00 +03:00
nu-cmd-lang use let-else syntax where possible (#8886) 2023-04-14 20:51:38 +02:00
nu-color-config Relax the closure syntax, highlight differently (#8846) 2023-04-12 05:21:52 +12:00
nu-command Apply continue to each (#8889) 2023-04-15 17:11:02 +12:00
nu-engine Change NU_LIB_DIRS not to depend on $nu.config-path (#8887) 2023-04-14 23:16:00 +03:00
nu-explore Update crossterm version to 0.26 (#8623) 2023-04-14 22:14:57 +02:00
nu-glob Bump to 0.78.1 development version (#8741) 2023-04-05 13:36:10 +12:00
nu-json Bump to 0.78.1 development version (#8741) 2023-04-05 13:36:10 +12:00
nu-parser Allow arguments for the last flag in short flag batch (#8808) 2023-04-15 10:24:51 +02:00
nu-path Correction bug multiple dots mkdir and touch (#8486) 2023-04-05 20:22:56 +03:00
nu-plugin Bump to 0.78.1 development version (#8741) 2023-04-05 13:36:10 +12:00
nu-pretty-hex Bump to 0.78.1 development version (#8741) 2023-04-05 13:36:10 +12:00
nu-protocol Allow arguments for the last flag in short flag batch (#8808) 2023-04-15 10:24:51 +02:00
nu-std std: remove logging example (#8877) 2023-04-14 07:15:56 -05:00
nu-system Add ppid to ps command (#8750) 2023-04-05 13:12:01 -05:00
nu-table Bump to 0.78.1 development version (#8741) 2023-04-05 13:36:10 +12:00
nu-term-grid Bump to 0.78.1 development version (#8741) 2023-04-05 13:36:10 +12:00
nu-test-support Add option to not load std-lib. Default tests to not use std-lib (#8833) 2023-04-10 10:55:29 +12:00
nu-utils Change NU_LIB_DIRS not to depend on $nu.config-path (#8887) 2023-04-14 23:16:00 +03: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.