console: add admin.clearHistory command (#15614)
This commit is contained in:
committed by
Felix Lange
parent
d95962cd5d
commit
586198ccea
@ -51,6 +51,9 @@ type UserPrompter interface {
|
||||
// if and only if the prompt to append was a valid command.
|
||||
AppendHistory(command string)
|
||||
|
||||
// ClearHistory clears the entire history
|
||||
ClearHistory()
|
||||
|
||||
// SetWordCompleter sets the completion function that the prompter will call to
|
||||
// fetch completion candidates when the user presses tab.
|
||||
SetWordCompleter(completer WordCompleter)
|
||||
@ -158,6 +161,11 @@ func (p *terminalPrompter) AppendHistory(command string) {
|
||||
p.State.AppendHistory(command)
|
||||
}
|
||||
|
||||
// ClearHistory clears the entire history
|
||||
func (p *terminalPrompter) ClearHistory() {
|
||||
p.State.ClearHistory()
|
||||
}
|
||||
|
||||
// SetWordCompleter sets the completion function that the prompter will call to
|
||||
// fetch completion candidates when the user presses tab.
|
||||
func (p *terminalPrompter) SetWordCompleter(completer WordCompleter) {
|
||||
|
Reference in New Issue
Block a user