-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Allow using SelectedSubmodule in CustomCommands #5015
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
base: master
Are you sure you want to change the base?
Conversation
stefanhaller
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, thanks for the contribution. The code looks good (with one minor nitpick in the test). However, the commit history is a mess, please clean it up; see https://github.com/jesseduffield/lazygit/blob/master/CONTRIBUTING.md#commit-history.
docs/Custom_Command_Keybindings.md
Outdated
| | status | The 'Status' tab | | ||
| | files | The 'Files' tab | | ||
| | worktrees | The 'Worktrees' tab | | ||
| | submodules | The 'Submodules' tab | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is unrelated to the rest of your changes, it should be a commit of its own (probably first). It is already possible to do this today, you just can't do much with it.
| Run: func(t *TestDriver, keys config.KeybindingConfig) { | ||
| t.Views().Submodules(). | ||
| Focus(). | ||
| NavigateToLine(Contains("submodule")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's the only line we have in that view, no need to navigate to it. We usually do
Lines(
Contains("submodule").IsSelected(),
)in cases like this.
PR Description
This PR allows the use of
{{ SelectedSubmodule.Path }},{{ SelectedSubmodule.Name }}and{{ SelectedSubmodule.Url }}in custom commands.Please check if the PR fulfills these requirements
go generate ./...)