1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-01-04 03:48:07 +02:00

Be able to copy file name

This commit is contained in:
Yuki Osaki 2020-09-19 19:55:52 +09:00 committed by Jesse Duffield
parent 307d051ec2
commit 1fd89b4f46
3 changed files with 24 additions and 0 deletions

View File

@ -452,6 +452,12 @@ func (gui *Gui) GetInitialKeybindings() []*Binding {
Handler: gui.handleGitFetch,
Description: gui.Tr.SLocalize("fetch"),
},
{
ViewName: "files",
Key: gui.getKey("universal.copyToClipboard"),
Handler: gui.wrappedHandler(gui.handleCopySelectedSideContextItemToClipboard),
Description: gui.Tr.SLocalize("copyFileNameToClipboard"),
},
{
ViewName: "",
Key: gui.getKey("universal.executeCustomCommand"),
@ -867,6 +873,12 @@ func (gui *Gui) GetInitialKeybindings() []*Binding {
Handler: gui.wrappedHandler(gui.handleCopySelectedSideContextItemToClipboard),
Description: gui.Tr.SLocalize("copyCommitShaToClipboard"),
},
{
ViewName: "commitFiles",
Key: gui.getKey("universal.copyToClipboard"),
Handler: gui.wrappedHandler(gui.handleCopySelectedSideContextItemToClipboard),
Description: gui.Tr.SLocalize("copyCommitFileNameToClipboard"),
},
{
ViewName: "branches",
Contexts: []string{SUB_COMMITS_CONTEXT_KEY},

View File

@ -1144,6 +1144,12 @@ func addDutch(i18nObject *i18n.Bundle) error {
}, &i18n.Message{
ID: "copyBranchNameToClipboard",
Other: "copieer branch name naar clipboard",
}, &i18n.Message{
ID: "copyFileNameToClipboard",
Other: "Kopieer de bestandsnaam naar het klembord",
}, &i18n.Message{
ID: "copyCommitFileNameToClipboard",
Other: "Kopieer de vastgelegde bestandsnaam naar het klembord",
}, &i18n.Message{
ID: "commitPrefixPatternError",
Other: "Fout in commitPrefix patroon",

View File

@ -1149,6 +1149,12 @@ func addEnglish(i18nObject *i18n.Bundle) error {
}, &i18n.Message{
ID: "copyBranchNameToClipboard",
Other: "copy branch name to clipboard",
}, &i18n.Message{
ID: "copyFileNameToClipboard",
Other: "Copy the file name to the clipboard",
}, &i18n.Message{
ID: "copyCommitFileNameToClipboard",
Other: "Copy the committed file name to the clipboard",
}, &i18n.Message{
ID: "commitPrefixPatternError",
Other: "Error in commitPrefix pattern",