diff --git a/README.md b/README.md index e73744d..721ce79 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,7 @@ $ isac |C-u|power on current row's server| |C-r|refresh rows| |BackSpace, C-b, C-h|delete a filter character| +|C-a|delete all filter characters| |C-s|sort rows| |C-/|show help| |Enter|show current row's detail| diff --git a/lib/isac.go b/lib/isac.go index 9fb8b48..73e897c 100644 --- a/lib/isac.go +++ b/lib/isac.go @@ -97,6 +97,8 @@ MAINLOOP: case termbox.KeyCtrlSlash: i.state.Toggle("help") i.draw("") + case termbox.KeyCtrlA: + i.removeRuneAllFromFilter() case termbox.KeyBackspace2, termbox.KeyCtrlB, termbox.KeyCtrlH: i.removeRuneFromFilter() case termbox.KeyCtrlS: @@ -150,6 +152,7 @@ func (i *Isac) draw(message string) { " power on current row's server", " refresh rows", ", C-b>, delete a filter character", + " delete all filter characters", " sort rows", " show help", " show current row's detail", @@ -338,3 +341,8 @@ func (i *Isac) removeRuneFromFilter() { i.draw("") } + +func (i *Isac) removeRuneAllFromFilter() { + i.filter = "" + i.draw("") +}