nushell/crates/nu-command
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
..
assets refactor html module (#5246) 2022-04-20 08:50:14 -05:00
proptest-regressions/format_conversions add tests, deal with pipes, newlines, tabs for to nuon (#6391) 2022-09-01 14:08:19 +02:00
src Add helper method to check whether ctrl+c was pressed, adopt it (#7482) 2022-12-15 09:39:24 -08:00
tests Try to fix #7380 (#7446) 2022-12-15 08:47:04 -06:00
build.rs Fix panic when building without git (#6289) 2022-08-10 10:31:12 -05:00
Cargo.toml Try to fix #7380 (#7446) 2022-12-15 08:47:04 -06:00
LICENSE Include license text in all crates (#5094) 2022-04-08 10:47:13 +02:00