1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-06-15 00:15:32 +02:00
Commit Graph

21 Commits

Author SHA1 Message Date
dbca9306de Rename "Custom Command" to "Shell Command"
The double use of the term "Custom Command" for both shell commands and
user-configured keybindings was confusing.
2024-08-17 10:56:03 +02:00
0f9d9e13d1 Show mode-specific keybinding suggestions
As part of making lazygit more discoverable, there are certain keys which you almost certainly
need to press when you're in a given mode e.g. 'v' to paste commits when cherry-picking. This
commit prominently shows these keybinding suggestions alongside the others in the option view.

I'm using the same colours for these keybindings as is associated with the mode elsewhere e.g.
yellow for rebasing and cyan for cherry-picking. The cherry-picking one is a bit weird because
we also use cyan text to show loaders and app status at the bottom left so it may be confusing,
but I haven't personally found it awkward from having tested it out myself.

Previously we would render these options whenever a new context was activated, but now that we
need to re-render options whenever a mode changes, I'm instead rendering them on each screen
re-render (i.e. in the layout function). Given how cheap it is to render this text, I think
it's fine performance-wise.
2024-01-28 08:33:13 +11:00
7bddf53223 Improve keybinding descriptions
This adds a bunch of tooltips to keybindings and updates some keybinding descriptions (i.e. labels).

It's in preparation for displaying more keybindings on-screen (in the bottom right of the screen),
and so due in part to laziness it shortens some descriptions so that we don't need to manage both
a short and long description (for on-screen vs in-menu). Nonetheless I've added a ShortDescription
field for when we do want to have both a short and long description.

You'll notice that some keybindings I deemed unworthy of the options view have longer descriptions,
because I could get away with it.
2024-01-28 08:12:01 +11:00
51fb82d6bf Enforce single-item selection in various actions
We want to show an error when the user tries to invoke an action that expects only
a single item to be selected.

We're using the GetDisabledReason field to enforce this (as well as DisabledReason
on menu items).

I've created a ListControllerTrait to store some shared convenience functions for this.
2024-01-19 10:50:49 +11:00
d772c9f1d4 Use sentence case everywhere
We have not been good at consistent casing so far. Now we use 'Sentence case' everywhere. EVERYWHERE.

Also Removing 'Lc' prefix from i18n field names: the 'Lc' stood for lowercase but now that everything
is in 'Sentence case' there's no need for the distinction.

I've got a couple lower case things I've kept: namely, things that show up in parentheses.
2023-05-25 23:52:19 +10:00
0faa41e6f8 move toggle whitespace action to controllers package 2023-04-30 13:19:53 +10:00
037cd99138 move quit actions to controller 2023-04-30 13:19:53 +10:00
2da300f2fb move diffing menu action to controller 2023-04-30 13:19:53 +10:00
7848958326 move filtering menu action to controller 2023-04-30 13:19:53 +10:00
2cba98e3fe move another action into controller 2023-04-30 13:19:53 +10:00
f8c9ce33c2 move more actions into controller 2023-04-30 13:19:53 +10:00
71753770ad move custom patch options menu action to controllers package 2023-04-30 13:19:53 +10:00
820b1e811d move custom command action into its own file 2023-04-30 13:19:53 +10:00
db12853bbe lots of changes 2023-04-30 13:19:53 +10:00
711674f6cd standardise controller helper methods 2023-04-30 13:19:53 +10:00
2b4ac986a2 Don't add custom command to history if it starts with space
Add tests for custom command with leading space
2023-04-13 21:20:46 +10:00
eda8f4a5d4 lots more generics 2022-03-24 20:14:41 +11:00
c7a629c440 make more use of generics 2022-03-24 20:14:41 +11:00
722410aded refactor controllers 2022-03-17 19:13:40 +11:00
482bdc4f1e more refactoring 2022-03-17 19:13:40 +11:00
8e3484d8e9 add global controller 2022-03-17 19:13:40 +11:00