mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-15 01:34:26 +02:00
Add shortcuts for filtering files by status
- 's' for showing only staged files - 'u' for showing only unstaged files - 'r' for resetting the filter
This commit is contained in:
committed by
Jesse Duffield
parent
a65f003ccc
commit
efb6524fa0
@ -670,18 +670,21 @@ func (self *FilesController) handleStatusFilterPressed() error {
|
|||||||
OnPress: func() error {
|
OnPress: func() error {
|
||||||
return self.setStatusFiltering(filetree.DisplayStaged)
|
return self.setStatusFiltering(filetree.DisplayStaged)
|
||||||
},
|
},
|
||||||
|
Key: 's',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Label: self.c.Tr.FilterUnstagedFiles,
|
Label: self.c.Tr.FilterUnstagedFiles,
|
||||||
OnPress: func() error {
|
OnPress: func() error {
|
||||||
return self.setStatusFiltering(filetree.DisplayUnstaged)
|
return self.setStatusFiltering(filetree.DisplayUnstaged)
|
||||||
},
|
},
|
||||||
|
Key: 'u',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Label: self.c.Tr.ResetFilter,
|
Label: self.c.Tr.ResetFilter,
|
||||||
OnPress: func() error {
|
OnPress: func() error {
|
||||||
return self.setStatusFiltering(filetree.DisplayAll)
|
return self.setStatusFiltering(filetree.DisplayAll)
|
||||||
},
|
},
|
||||||
|
Key: 'r',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
Reference in New Issue
Block a user