nushell/crates/nu-explore/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
..
commands Add and use new Signals struct (#13314) 2024-07-07 22:29:01 +00:00
nu_common Add and use new Signals struct (#13314) 2024-07-07 22:29:01 +00:00
pager Add and use new Signals struct (#13314) 2024-07-07 22:29:01 +00:00
registry explore: pass config to views at creation time (#13312) 2024-07-07 08:09:59 -05:00
views explore: pass config to views at creation time (#13312) 2024-07-07 08:09:59 -05:00
default_context.rs Move explore command out of nu-command deps (#9421) 2023-06-14 01:18:36 +02:00
explore.rs Add and use new Signals struct (#13314) 2024-07-07 22:29:01 +00:00
lib.rs Add and use new Signals struct (#13314) 2024-07-07 22:29:01 +00:00