Enable history entry exclusion with leading space (#9371)

# Description
Makes use of the feature introduced by nushell/reedline#566

If we consider this to be problematic we can decide to add a config
point for this behavior, but at first I was a bit hesistant expanding
the config in this area.


# User-Facing Changes
Follows precedent found in bash/zsh/fish to exclude lines starting with
a space from the history.
Like in fish you can still recall the last entry once but it will not be
stored and will be forgotten after the next submitted entry.


# Tests + Formatting
(-)
This commit is contained in:
Stefan Holderbach 2023-06-11 00:15:46 +02:00 committed by GitHub
parent 9c84c01aef
commit 374df9d69f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -141,6 +141,7 @@ pub fn evaluate_repl(
};
line_editor = line_editor
.with_history_session_id(history_session_id)
.with_history_exclusion_prefix(Some(" ".into()))
.with_history(history);
};
perf(