summaryrefslogtreecommitdiffstats
path: root/pkg/commands
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2023-08-09 20:59:46 +1000
committerJesse Duffield <jessedduffield@gmail.com>2023-08-09 21:00:27 +1000
commit9e7018db8a63c4ddbd073e0967151eb05a75c84b (patch)
tree61a8e7cf9390717318915a6f67670d8abb90eecc /pkg/commands
parentcdea5b4873d92e14eea2302f6823e23efaf678f6 (diff)
Honour editInTerminal value when opening a worktree folder
There was no good reason not to do this in the first place.
Diffstat (limited to 'pkg/commands')
-rw-r--r--pkg/commands/git_commands/file.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/pkg/commands/git_commands/file.go b/pkg/commands/git_commands/file.go
index 7efdb567a..9fd5e8929 100644
--- a/pkg/commands/git_commands/file.go
+++ b/pkg/commands/git_commands/file.go
@@ -131,15 +131,15 @@ func (self *FileCommands) GetEditAtLineAndWaitCmdStr(filename string, lineNumber
return cmdStr
}
-func (self *FileCommands) GetOpenDirInEditorCmdStr(path string) string {
- template := config.GetOpenDirInEditorTemplate(&self.UserConfig.OS, self.guessDefaultEditor)
+func (self *FileCommands) GetOpenDirInEditorCmdStr(path string) (string, bool) {
+ template, editInTerminal := config.GetOpenDirInEditorTemplate(&self.UserConfig.OS, self.guessDefaultEditor)
templateValues := map[string]string{
"dir": self.cmd.Quote(path),
}
cmdStr := utils.ResolvePlaceholderString(template, templateValues)
- return cmdStr
+ return cmdStr, editInTerminal
}
func (self *FileCommands) guessDefaultEditor() string {