mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-19 22:33:16 +02:00
add file to command
This commit is contained in:
parent
fb5d25c9e9
commit
417cb97dc6
@ -279,7 +279,7 @@ func sublimeOpenFile(g *gocui.Gui, filename string) (string, error) {
|
|||||||
|
|
||||||
func openFile(g *gocui.Gui, filename string) (string, error) {
|
func openFile(g *gocui.Gui, filename string) (string, error) {
|
||||||
cmdName, cmdTrail := getOpenCommand()
|
cmdName, cmdTrail := getOpenCommand()
|
||||||
return runCommand(cmdName + " " + cmdTrail)
|
return runCommand(cmdName + " " + filename + " " + cmdTrail) // TODO: find out why finder is being opened here
|
||||||
}
|
}
|
||||||
|
|
||||||
func gitAddPatch(g *gocui.Gui, filename string) {
|
func gitAddPatch(g *gocui.Gui, filename string) {
|
||||||
@ -306,7 +306,7 @@ func getOpenCommand() (string, string) {
|
|||||||
"cygstart": "",
|
"cygstart": "",
|
||||||
}
|
}
|
||||||
for name, trail := range trailMap {
|
for name, trail := range trailMap {
|
||||||
if out, _ := runCommand("which " + name); out != "" {
|
if out, _ := runCommand("which " + name); out != "exit status 1" {
|
||||||
return name, trail
|
return name, trail
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user