Shell history module reworked to use ring buffer for storing
commands. Dedicated buffer is used to story all command lineary.
History capacity is in bytes not in number of entries, e.g.
many short commands can be stored or few long (depending on
CONFIG_SHELL_HISTORY_BUFFER).
Removed implicit command null termination from shell_history and
added it to shell after fetching command line from the history.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
This patch increases the amount of slab memory per item for the shell
history to match the maximum command input buffer size plus the
accounting information for the dnode list item.
Signed-off-by: Andy Gross <andy.gross@linaro.org>
Change arg_len to be u16_t in shell_history_get since it is returning
a value that can be hold by u16_t.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
When user was typing a new command and next pressed an up arrow
shell has displayed previously executed command. Next it was not
possible to display back currently edited command using a down arrow.
Fixes#10766.
Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>