Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Dagur opened this issue Apr 2, 2024 · 2 comments
Open
Labels
enhancement New feature or request

Comments

@Dagur
Copy link

Dagur commented Apr 2, 2024

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 Dagur added the enhancement New feature or request label Apr 2, 2024
@mark2185
Copy link
Collaborator

mark2185 commented Apr 3, 2024

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'

@Dagur
Copy link
Author

Dagur commented Apr 3, 2024

Thanks. I can use that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants