lazygit icon indicating copy to clipboard operation
lazygit copied to clipboard

Add "Update Submodule" to the context menu of submodules in the "Files" list.

Open Dagur opened this issue 1 year ago • 2 comments

Is your feature request related to a problem? Please describe. If I want to update a submodule I have to open the submodules list and press "u" on it there. It would save me the extra steps if I could just select the submodule in the Files list instead and do it there.

Describe the solution you'd like Add "Update Submodule" to the context menu of submodules in the "Files" list.

Describe alternatives you've considered I can use the Submodules list but this would be quicker.

Dagur avatar Apr 02 '24 14:04 Dagur

Would a custom command help you?

E.g. for updating all of the submodules:

customCommands:
  - key: 'U'
    command: 'git submodule update --init --recursive'
    context: 'files'
    description: 'Update submodules'
    stream: true

You could probably set something up for updating the currently selected submodule as well (didn't test this):

customCommands:
  - key: 'u'
    command: 'git submodule update -- {{.SelectedFile.Name}}'
    context: 'files'
    description: 'Update submodule'

mark2185 avatar Apr 03 '24 06:04 mark2185

Thanks. I can use that.

Dagur avatar Apr 03 '24 08:04 Dagur