summaryrefslogtreecommitdiffstats
path: root/pkg/commands/files.go
diff options
context:
space:
mode:
authorcaojoshua <cao.joshua@yahoo.com>2021-05-19 23:44:58 -0700
committerJesse Duffield <jessedduffield@gmail.com>2021-06-05 10:58:09 +1000
commit60468d2e174656675b8058df519b6547bc7ca62e (patch)
tree397ed7424f8f0ba4061206b4989804fa509e56c8 /pkg/commands/files.go
parentcb78cf7de4798bf628cf726689d62b18da34a347 (diff)
Edit command as user OS config option
Diffstat (limited to 'pkg/commands/files.go')
-rw-r--r--pkg/commands/files.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/pkg/commands/files.go b/pkg/commands/files.go
index 4071c8c76..8c86cfcf7 100644
--- a/pkg/commands/files.go
+++ b/pkg/commands/files.go
@@ -318,7 +318,11 @@ func (c *GitCommand) ResetAndClean() error {
}
func (c *GitCommand) EditFileCmdStr(filename string) (string, error) {
- editor := c.GetConfigValue("core.editor")
+ editor := c.Config.GetUserConfig().OS.EditCommand
+
+ if editor == "" {
+ editor = c.GetConfigValue("core.editor")
+ }
if editor == "" {
editor = c.OSCommand.Getenv("GIT_EDITOR")