Document reason for stack.start_capture()

h/t @IanManske
This commit is contained in:
sholderbach 2024-08-04 21:22:47 +02:00
parent 38a75a263e
commit dd15b3001f

View File

@ -14,7 +14,12 @@ pub fn get_full_help(
engine_state: &EngineState,
stack: &mut Stack,
) -> String {
// Precautionary step to capture any command output generated during this operation. We
// internally call several commands (`table`, `ansi`, `nu-highlight`) and get their
// `PipelineData` using this `Stack`, any other output should not be redirected like the main
// execution.
let stack = &mut stack.start_capture();
let signature = command.signature().update_from_command(command);
get_documentation(