]>
cloudbase.mooo.com Git - z180-stamp.git/blob - include/cli_readline.h
2 * (C) Copyright 2014-2016 Leo C. <erbl259-lmu@yahoo.de>
4 * (C) Copyright 2014 Google, Inc
5 * Simon Glass <sjg@chromium.org>
7 * SPDX-License-Identifier: GPL-2.0
10 #ifndef CLI_READLINE_H
11 #define CLI_READLINE_H
16 extern char console_buffer
[]; /* console I/O buffer */
19 * cli_readline() - read a line into the console_buffer
21 * Display the prompt, then read a command line into console_buffer. The
22 * maximum line length is CONFIG_SYS_CBSIZE including a \0 terminator, which
23 * will always be added.
25 * The command is echoed as it is typed. Command editing is supported.
26 * Tab auto-complete is supported if CONFIG_AUTO_COMPLETE is defined.
28 * @prompt: Prompt to display
29 * @enable_history: Use history buffer if true
30 * @return command line length excluding terminator, or -ve on error
32 int cli_readline(const FLASH
char *const prompt
, bool enable_history
);
34 #endif /* CLI_READLINE_H */