aboutsummaryrefslogtreecommitdiff
path: root/include/cli.h
diff options
context:
space:
mode:
authorSimon Glass2023-10-01 19:13:15 -0600
committerTom Rini2023-10-11 15:43:54 -0400
commit8fc041fe4c34bb6108444ee9970151f43add0ce9 (patch)
treeb9894adb19e15d55b4e9b98eb805acbbc94251d1 /include/cli.h
parent657e14da835298a948eb313feffba6732fe9232e (diff)
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>
Diffstat (limited to 'include/cli.h')
-rw-r--r--include/cli.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/cli.h b/include/cli.h
index bbc53276435..252bdb70ab0 100644
--- a/include/cli.h
+++ b/include/cli.h
@@ -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;
};