write history to history file on quit

Related #81
This commit is contained in:
Gokcehan committed 2018-07-12 21:22:36 +03:00
1 parent 211bcd0444
commit cdf4fcb810
4 files changed
+82 -2

No files matched your search

+6 -2
View File
@@ -30,6 +30,7 @@ var (
gUser *user.User
gConfigPaths []string
gMarksPath string
gHistoryPath string
)
func init() {
@@ -58,12 +59,15 @@ func init() {
// remove domain prefix
gUser.Username = strings.Split(gUser.Username, `\`)[1]
data := os.Getenv("LOCALAPPDATA")
gConfigPaths = []string{
filepath.Join(os.Getenv("ProgramData"), "lf", "lfrc"),
filepath.Join(os.Getenv("LOCALAPPDATA"), "lf", "lfrc"),
filepath.Join(data, "lf", "lfrc"),
}
gMarksPath = filepath.Join(os.Getenv("LOCALAPPDATA"), "lf", "marks")
gMarksPath = filepath.Join(data, "lf", "marks")
gHistoryPath = filepath.Join(data, "lf", "history")
}
func pauseCommand() *exec.Cmd {