nushell/crates/nu-parser/src
JT 35bea5e044
Pipeline operators: && and || (#7448)
# Description

We got some feedback from folks used to other shells that `try/catch`
isn't quite as convenient as things like `||`. This PR adds `&&` as a
synonym for `;` and `||` as equivalent to what `try/catch` would do.

# User-Facing Changes

Adds `&&` and `||` pipeline operators.

# Tests + Formatting

Don't forget to add tests that cover your changes.

Make sure you've run and fixed any issues with these commands:

- `cargo fmt --all -- --check` to check standard code formatting (`cargo
fmt --all` applies these changes)
- `cargo clippy --workspace -- -D warnings -D clippy::unwrap_used -A
clippy::needless_collect` to check that you're using the standard code
style
- `cargo test --workspace` to check that all tests pass

# After Submitting

If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
2022-12-13 09:53:46 +13:00
..
deparse.rs fix arg parse (#5754) 2022-06-11 20:52:31 +12:00
errors.rs Better errors when bash-like operators are used (#7241) 2022-12-08 12:02:11 +13:00
flatten.rs Pipeline operators: && and || (#7448) 2022-12-13 09:53:46 +13:00
known_external.rs Change how to identify custom comamnd (#6187) 2022-08-02 18:40:07 -05:00
lex.rs Pipeline operators: && and || (#7448) 2022-12-13 09:53:46 +13:00
lib.rs Parser refactoring for improving pipelines (#7162) 2022-11-19 10:46:48 +13:00
parse_keywords.rs Pipeline operators: && and || (#7448) 2022-12-13 09:53:46 +13:00
parser.rs Pipeline operators: && and || (#7448) 2022-12-13 09:53:46 +13:00
type_check.rs allow tables in ++ operator (#7051) 2022-12-01 00:21:59 +01:00