lazydocker
                                
                                 lazydocker copied to clipboard
                                
                                    lazydocker copied to clipboard
                            
                            
                            
                        Clear logs
It'd be really useful to be able to clear the logs view and only show new items as they come in.
This is possible when viewing the logs independently (i.e. via the m keybind) and using the clear command to clear the terminal, but I often find myself jumping between containers to check the logs, so being able to do this within the lazydocker context would be handy!
I agree this would be a great feature. It might also be quite easy i.e. just press a key and then clear the main view. I'm gonna put a good-first-issue label on this. If you wanna take a stab at this @Tam lemme know and I can point you to the right places in the code to make the changes
It's been a minute since I last used Go @jesseduffield, but sure if you can point me in the right direction I'll try to find time soon to give it a shot!
Awesome :)
So you'll want to add a keybinding handler in pkg/gui/main_panel.go called handleClearMain
func (gui *Gui) handleClearMain() error {
	if gui.popupPanelFocused() {
		return nil
	}
    gui.Views.Main.Clear()
	return nil
}
and then you'll want to reference it from pkg/gui/keybindings.go like so:
		{
			ViewName: "main",
			Key:      gocui.KeyCtrlL,
			Modifier: gocui.ModNone,
			Handler:  wrappedHandler(gui.handleClearMain),
			Description: gui.Tr.ClearMain,
		},
You'll also need to add the keybinding's help text to pkg/i18n/english.go (that's what the gui.Tr.ClearMain thing refers to).
I'd see how that goes. We'll likely need to tweak it but that's a good starting spot
@jesseduffield, is anyone actively working on this issue right now?
Did you get a chance to start on this @Tam ? If you want to give it a go @26tanishabanik I'm happy to assign you
Did you get a chance to start on this @Tam ? If you want to give it a go @26tanishabanik I'm happy to assign you
I can give it a try @jesseduffield , though I have a question, how do I setup the local dev environment, is there specific doc for that?
@jesseduffield it’s probably gonna be a while before I have time, happy to let @26tanishabanik take the reins 👍
ClearMain
@jesseduffield , what does KeyCtrlL mean?
I'd guess it's ctrl+L.
I'd guess it's
ctrl+L.
Thanks @mark2185
@jesseduffield , ctrl+L is working, I am able to clear the logs, after moving my cursor to the logs tab