Shell Integration (#5162)

This commit renders ANSI chars in order to provide shell integrations
such Kitty's opening feature that captures the output of the last
command in a pager such as less.

Fixes #5138
This commit is contained in:
Marc Schreiber
2022-04-17 05:03:02 +02:00
committed by GitHub
parent 6e85b04923
commit a35b975d84
3 changed files with 51 additions and 13 deletions

View File

@@ -147,6 +147,10 @@ pub(crate) fn update_prompt<'prompt>(
(prompt_vi_insert_string, prompt_vi_normal_string),
);
if config.use_ansi_coloring {
nu_prompt.enable_shell_integration();
}
let ret_val = nu_prompt as &dyn Prompt;
if is_perf_true {
info!("update_prompt {}:{}:{}", file!(), line!(), column!());