Insert the first command line history line that starts with the content of the command line in the command line.
Deselects the currently selected completion.
Hide the command line and cmdline_state.clear its content without executing it.
Inserts the currently selected completion and a space in the command line.
Insert a space
If a completion is selected, inserts it in the command line with a space. If no completion is selected, inserts a space where the caret is.
Check if the command is valid
Selects the next completion.
Selects the next history line.
Selects the previous completion.
Selects the prev history line.
Save non-secret commands to the cmdHistory and update the cmdline_history_position
Execute the content of the command line and hide it.