diff options
Diffstat (limited to 'config/config_unix.go')
| -rw-r--r-- | config/config_unix.go | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/config/config_unix.go b/config/config_unix.go new file mode 100644 index 0000000..8f77235 --- /dev/null +++ b/config/config_unix.go @@ -0,0 +1,22 @@ +// +build darwin dragonfly freebsd linux nacl netbsd openbsd solaris + +package config + +import ( + "os" + "os/exec" + "path/filepath" +) + +var ( + editor string = setEditor() + fn string = filepath.Join(os.Getenv("HOME"), "."+configFilename) +) + +func setEditor() string { + e := os.Getenv("EDITOR") + if e == "" { + return "vi" + } + return e +} |
