editor_default.go 201 B

1234567891011121314
  1. //go:build !unix
  2. package config
  3. import (
  4. "os/exec"
  5. )
  6. func (cfg *Config) CreateEditorCommand(path string) *exec.Cmd {
  7. if cfg.Editor == "" {
  8. return nil
  9. }
  10. return exec.Command(cfg.Editor, path)
  11. }