nushell/crates/nu-parser/src
Andrej Kolchin 5d5088b5d5
Match ++= capabilities with ++ (#11130)
Allow `++=` to work in all situations `++` does, namely for appending
single elements: `$list ++= 1`.

Resolve #11087

# Description

Bring `++=` to parity with `++`.

# User-Facing Changes

It is now possible to do `$list ++= 1` (appending a single element).
Similarly, this can be done:

```Nushell
~> mut a = [1]
~> $a ++= 2
~> a
╭───┬───╮
│ 0 │ 1 │
│ 1 │ 2 │
╰───┴───╯
```

# Tests + Formatting

Added two tests:

- `commands::assignment::append_assign::append_assign_single_element`
- `commands::assignment::append_assign::append_assign_to_single_element`
2023-12-07 05:46:37 +08:00
..
deparse.rs allow empty string arguments (#9420) 2023-06-13 07:30:30 -05:00
flatten.rs Fix highlighting of spread subexpressions in records (#11202) 2023-12-06 08:56:35 +08:00
known_external.rs Sort entries in scope commands; Fix usage of externs (#10039) 2023-08-17 16:37:01 +02:00
lex.rs Support o>>, e>>, o+e>> to append output to an external file (#10764) 2023-11-27 07:52:39 -06:00
lib.rs Move SyntaxShape specifier parsing into own file (#10448) 2023-10-05 23:31:40 +02:00
lite_parser.rs Support o>>, e>>, o+e>> to append output to an external file (#10764) 2023-11-27 07:52:39 -06:00
parse_keywords.rs Do not create help for wrapped command (#11235) 2023-12-05 13:04:36 -06:00
parse_patterns.rs add match guards (#9621) 2023-07-16 12:25:12 +12:00
parse_shape_specs.rs Move SyntaxShape specifier parsing into own file (#10448) 2023-10-05 23:31:40 +02:00
parser_path.rs Add virtual path abstraction layer (#9245) 2023-05-23 23:48:50 +03:00
parser.rs Reduce code duplication in eval.rs and eval_const.rs (#11192) 2023-12-04 21:13:47 +02:00
type_check.rs Match ++= capabilities with ++ (#11130) 2023-12-07 05:46:37 +08:00