nushell/crates/nu-command/src
Ian Manske 399a7c8836
Add and use new Signals struct (#13314)
# Description
This PR introduces a new `Signals` struct to replace our adhoc passing
around of `ctrlc: Option<Arc<AtomicBool>>`. Doing so has a few benefits:
- We can better enforce when/where resetting or triggering an interrupt
is allowed.
- Consolidates `nu_utils::ctrl_c::was_pressed` and other ad-hoc
re-implementations into a single place: `Signals::check`.
- This allows us to add other types of signals later if we want. E.g.,
exiting or suspension.
- Similarly, we can more easily change the underlying implementation if
we need to in the future.
- Places that used to have a `ctrlc` of `None` now use
`Signals::empty()`, so we can double check these usages for correctness
in the future.
2024-07-07 22:29:01 +00:00
..
bytes Add and use new Signals struct (#13314) 2024-07-07 22:29:01 +00:00
charting Add derive macros for FromValue and IntoValue to ease the use of Values in Rust code (#13031) 2024-06-17 16:05:11 -07:00
conversions Add and use new Signals struct (#13314) 2024-07-07 22:29:01 +00:00
database Add and use new Signals struct (#13314) 2024-07-07 22:29:01 +00:00
date Add and use new Signals struct (#13314) 2024-07-07 22:29:01 +00:00
debug Add and use new Signals struct (#13314) 2024-07-07 22:29:01 +00:00
env Define keywords (#13213) 2024-06-25 18:32:54 -07:00
experimental Add command_prelude module (#12291) 2024-03-26 21:17:30 +00:00
filesystem Add and use new Signals struct (#13314) 2024-07-07 22:29:01 +00:00
filters Add and use new Signals struct (#13314) 2024-07-07 22:29:01 +00:00
formats Add and use new Signals struct (#13314) 2024-07-07 22:29:01 +00:00
generators Add and use new Signals struct (#13314) 2024-07-07 22:29:01 +00:00
hash Add and use new Signals struct (#13314) 2024-07-07 22:29:01 +00:00
help help operators refactor (#13307) 2024-07-06 13:09:12 -05:00
math Add and use new Signals struct (#13314) 2024-07-07 22:29:01 +00:00
misc Revert "Span ID Refactor (Step 2): Make Call SpanId-friendly (#13268)" (#13292) 2024-07-04 00:02:13 +03:00
network Add and use new Signals struct (#13314) 2024-07-07 22:29:01 +00:00
path Add and use new Signals struct (#13314) 2024-07-07 22:29:01 +00:00
platform Add and use new Signals struct (#13314) 2024-07-07 22:29:01 +00:00
random Add and use new Signals struct (#13314) 2024-07-07 22:29:01 +00:00
removed Add command_prelude module (#12291) 2024-03-26 21:17:30 +00:00
shells Add command_prelude module (#12291) 2024-03-26 21:17:30 +00:00
stor Add and use new Signals struct (#13314) 2024-07-07 22:29:01 +00:00
strings Add and use new Signals struct (#13314) 2024-07-07 22:29:01 +00:00
system Add and use new Signals struct (#13314) 2024-07-07 22:29:01 +00:00
viewers Add and use new Signals struct (#13314) 2024-07-07 22:29:01 +00:00
default_context.rs add str deunicode command (#13270) 2024-06-29 16:12:34 -05:00
example_test.rs Initial --params implementation (#12249) 2024-03-24 15:40:21 -05:00
lib.rs Initial --params implementation (#12249) 2024-03-24 15:40:21 -05:00
progress_bar.rs Replace ExternalStream with new ByteStream type (#12774) 2024-05-16 07:11:18 -07:00
sort_utils.rs Add derive macros for FromValue and IntoValue to ease the use of Values in Rust code (#13031) 2024-06-17 16:05:11 -07:00