nushell/crates/nu-engine/src
Reilly Wood e215fbbd08
Add helper method to check whether ctrl+c was pressed, adopt it (#7482)
I've been working on streaming and pipeline interruption lately. It was
bothering me that checking ctrl+c (something we want to do often) always
requires a bunch of boilerplate like:
```rust
use std::sync::atomic::Ordering;

if let Some(ctrlc) = &engine_state.ctrlc {
     if ctrlc.load(Ordering::SeqCst) {
          ...
```
I added a helper method to cut that down to:

```rust
if nu_utils::ctrl_c::was_pressed(&engine_state.ctrlc) {
    ...
```
2022-12-15 09:39:24 -08:00
..
call_ext.rs Friendly error message for access beyond end (#6944) 2022-10-29 19:47:50 +02:00
column.rs Improve CantFindColumn and ColumnAlreadyExists errors (#7164) 2022-11-19 09:35:55 -08:00
documentation.rs Reduced LOC by replacing several instances of Value::Int {}, Value::Float{}, Value::Bool {}, and Value::String {} with Value::int(), Value::float(), Value::boolean() and Value::string() (#7412) 2022-12-09 11:37:51 -05:00
env.rs Improve empty pipelines (#7383) 2022-12-08 07:31:57 +13:00
eval.rs Add helper method to check whether ctrl+c was pressed, adopt it (#7482) 2022-12-15 09:39:24 -08:00
glob_from.rs Run a round of clippy --fix to fix a ton of lints (#7006) 2022-11-04 15:11:17 -05:00
lib.rs New commands: break, continue, return, and loop (#7230) 2022-11-25 09:39:16 +13:00
scope.rs Add input-output types to $nu.scope.commands (#7105) 2022-11-12 14:26:20 -08:00