1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-09-02 17:22:22 +02:00

cli: Allow history to be disabled

When inputting text outside the command line we don't want history to be
accessible. Add an option to control this.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2023-10-01 19:13:15 -06:00
committed by Tom Rini
parent 657e14da83
commit 8fc041fe4c
2 changed files with 25 additions and 21 deletions

View File

@@ -31,6 +31,7 @@ struct cli_ch_state {
* @num: Current cursor position, where 0 is the start
* @eol_num: Number of characters in the buffer
* @insert: true if in 'insert' mode
* @history: true if history should be accessible
* @buf: Buffer containing line
* @prompt: Prompt for the line
*/
@@ -39,6 +40,7 @@ struct cli_line_state {
uint eol_num;
uint len;
bool insert;
bool history;
char *buf;
const char *prompt;
};