mirror of
https://github.com/nushell/nushell.git
synced 2025-04-09 21:28:55 +02:00
Add pipeline operators to help (#7449)
# Description _(Thank you for improving Nushell. Please, check our [contributing guide](../CONTRIBUTING.md) and talk to the core team before making major changes.)_ _(Description of your pull request goes here. **Provide examples and/or screenshots** if your changes affect the user experience.)_ # User-Facing Changes _(List of all changes that impact the user experience here. This helps us keep track of breaking changes.)_ # 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.
This commit is contained in:
parent
35bea5e044
commit
5b5f1d1b92
@ -312,6 +312,24 @@ fn generate_operator_info() -> Vec<OperatorInfo> {
|
|||||||
description: "Checks if one value is true and the other is false.".into(),
|
description: "Checks if one value is true and the other is false.".into(),
|
||||||
precedence: 45,
|
precedence: 45,
|
||||||
},
|
},
|
||||||
|
OperatorInfo {
|
||||||
|
op_type: "Pipeline".into(),
|
||||||
|
operator: "&&".into(),
|
||||||
|
name: "PipelineAnd".into(),
|
||||||
|
description:
|
||||||
|
"Runs the pipeline on the left and, if successful, runs pipeline on the right."
|
||||||
|
.into(),
|
||||||
|
precedence: 0,
|
||||||
|
},
|
||||||
|
OperatorInfo {
|
||||||
|
op_type: "Pipeline".into(),
|
||||||
|
operator: "||".into(),
|
||||||
|
name: "PipelineOr".into(),
|
||||||
|
description:
|
||||||
|
"Runs the pipeline on the left and, if it failed, runs pipeline on the right."
|
||||||
|
.into(),
|
||||||
|
precedence: 0,
|
||||||
|
},
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user