lazygit icon indicating copy to clipboard operation
lazygit copied to clipboard

Safer learning mode asking for confirmation

Open jmfayard opened this issue 2 years ago • 4 comments

Is your feature request related to a problem? Please describe.

I have written about lazygit in 15 Command Line Tools which Spark Joy in Your Terminal but I'm still a bit afraid to use it.

It takes time to learn the shortcuts with confidence, and in the meantime I could be git messing stuff by not using the right shortcut on my keyboard.

Describe the solution you'd like

I would like a learning mode where if you press a keyboard shortcut, it tells you what it's about to do and you have to press enter for confirmation. We could make it a bit fancier so that if you use it already 5 times the confirmation is not necessary anymore.

Describe alternatives you've considered

Learning all shortcuts at once and remembering them perfectly. Alas I'm just a human

jmfayard avatar Aug 04 '22 05:08 jmfayard

I would like the x : help command to be executable so that it can work as a command palette like in Visual Studio Code or IntelliJ

Well it sorta kinda is like that, it's just not fuzzily searchable. You can search for a pattern with /<pattern> and press <Enter> on a command/mapping you want to execute.

mark2185 avatar Aug 04 '22 06:08 mark2185

I removed this part

~~I would like the x : help command to be executable so that it can work as a command palette like in Visual Studio Code or IntelliJ~~

For some reason I thought it doesn't work, but it does, thanks Mark

jmfayard avatar Aug 04 '22 07:08 jmfayard

As for the learning mode, we try to have all of the "destructive" operations behind a menu or a confirmation panel so one cannot just force push to master.

The actions that are easily revertible (adding files, switching branches, creating new branches) are not guarded in that sense because they are somewhat "safe".

Did you by any chance encounter a mapping that you think should ask for confirmation, but didn't?

mark2185 avatar Aug 04 '22 07:08 mark2185

I will try to use it further and come up with specifics.

jmfayard avatar Aug 04 '22 08:08 jmfayard