++= appendAssign operator (#7346) (#7354)

# Description

Closes  https://github.com/nushell/nushell/issues/7346



# Tests + Formatting
```
> mut a = [1 2 3]
> $a ++= [4 5 6]
> $a
[1 2 3 4 5 6]
```
This commit is contained in:
raccmonteiro
2022-12-09 16:20:58 +00:00
committed by GitHub
parent fc5fe4b445
commit b56ad92e25
7 changed files with 124 additions and 0 deletions

View File

@ -81,6 +81,13 @@ fn generate_operator_info() -> Vec<OperatorInfo> {
description: "Adds a value to a variable.".into(),
precedence: 10,
},
OperatorInfo {
op_type: "Assignment".into(),
operator: "++=".into(),
name: "AppendAssign".into(),
description: "Appends a list or a value to a variable.".into(),
precedence: 10,
},
OperatorInfo {
op_type: "Assignment".into(),
operator: "-=".into(),