nushell/src
Ian Manske 872eb2c3df
Restore initial foreground process group on exit (#10021)
# Description
When launching nushell interactively from another shell, the parent
shell usually gives us own our process group and handles restoring
control to itself. However, other programs that do not support job
control expect us to give control of the terminal back to them. This PR
makes it so that we record the initial foreground process group and
restore it when nushell exits. An "exit" can be from the `exit` command,
a panic, or a `SIGTERM` signal.

The changes in `terminal.rs` mostly follow [fish's
example](0874dd6a96/fish-rust/src/common.rs (L1634)).

# User-Facing Changes
Fixes interactions between nushell and other interactive CLI commands
(e.g., VIFM #10015).
2023-09-08 18:19:01 +02:00
..
tests rename the types with spaces in them to use - (#9929) 2023-09-06 13:22:12 -05:00
command.rs Move Value to helpers, separate span call (#10121) 2023-09-03 07:27:29 -07:00
config_files.rs Remove "let config" warning (#10068) 2023-08-20 22:02:52 +02:00
ide.rs rename the types with spaces in them to use - (#9929) 2023-09-06 13:22:12 -05:00
logger.rs Use variable names directly in the format strings (#7906) 2023-01-29 19:37:54 -06:00
main.rs Move Value to helpers, separate span call (#10121) 2023-09-03 07:27:29 -07:00
README.md Remove old nushell/merge engine-q 2022-02-07 14:54:06 -05:00
run.rs allow --login to be used with nu's --commands parameter (#10253) 2023-09-06 13:27:16 -05:00
signals.rs Cleanup of src/main.rs (#7801) 2023-01-20 10:44:49 -08:00
terminal.rs Restore initial foreground process group on exit (#10021) 2023-09-08 18:19:01 +02:00
test_bins.rs Move eval_hook to nu-cmd-base (#10146) 2023-08-29 23:46:50 +02:00
tests.rs nu-cmd-extra crate infrastructure in place with the Bits command as the model for adding other commands (#9327) 2023-06-01 10:46:16 -07:00

Nushell REPL

This directory contains the main Nushell REPL (read eval print loop) as part of the CLI portion of Nushell, which creates the nu binary itself.

Current versions of the nu binary will use the Nu argument parsing logic to parse the commandline arguments passed to nu, leaving the logic here to be a thin layer around what the core libraries.