Home Explore Blog CI



nushell

lang-guide/chapters/operators.md
b015b19db41e78b3f59d8eb3346b4fb5750d5b0012e50d230000000300000377
# Operators

## Arithmetic Operators

- `+` - Plus / Addition
- `-` - Minus / Subtraction
- `*` - Multiply
- `/` - Divide
- `==` - Equal
- `!=` - Not Equal
- `//` - Floor Division
- `<` - Less Than
- `>` - Greater Than
- `<=` - Less Than or Equal To
- `>=` - Greater Than or Equal To
- `mod` - Modulo
- `**` - Pow

## Bitwise Operators

Nushell provides support for these bitwise operators:

- `bit-or` - bitwise or
- `bit-xor` - bitwise exclusive or
- `bit-and` - bitwise and
- `bit-shl` - bitwise shift left
- `bit-shr` - bitwise shift right

## Other operators

- `=~` - Regex Match / Contains
- `!~` - Not Regex Match / Not Contains
- `in` - In / Contains (doesn't use regex)
- `not-in` - Not In / Not Contains (doesn't use regex)
- `starts-with` - Starts With
- `ends-with` - Ends With
- `and` - And
- `or` - Or

## Brackets

TODO

### `(` and `)`

### `[` and `]`

### `{` and `}`

Chunks
07c6c78b (1st chunk of `lang-guide/chapters/operators.md`)
Title: Nushell Operators and Brackets
Summary
This section outlines the various operators available in Nushell, including arithmetic operators (+, -, *, /, etc.), bitwise operators (bit-or, bit-xor, bit-and, etc.), and other operators for regex matching, string comparison, and boolean logic. It also mentions the use of parentheses, square brackets, and curly braces, with a 'TODO' indicating further explanation is needed for brackets.