From 136e0ade0226d0c70b17f74042387b54bb9f4d72 Mon Sep 17 00:00:00 2001 From: Jonathan Bernard Date: Thu, 12 Nov 2020 10:42:00 -0600 Subject: [PATCH] Edit functionality no loger relies on sub-process receiving parent ENV. --- private/version.nim | 2 +- ptk.nim | 3 ++- ptk.nimble | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/private/version.nim b/private/version.nim index a95161f..253b541 100644 --- a/private/version.nim +++ b/private/version.nim @@ -1 +1 @@ -const PTK_VERSION* = "1.0.7" \ No newline at end of file +const PTK_VERSION* = "1.0.8" \ No newline at end of file diff --git a/ptk.nim b/ptk.nim index 8528f30..7cdd548 100644 --- a/ptk.nim +++ b/ptk.nim @@ -149,7 +149,8 @@ proc edit(mark: Mark): Mark = close(tempFile) tempFile = nil - discard os.execShellCmd "$EDITOR " & tempFileName & " /dev/tty" + let editor = getEnv("EDITOR", "vim") + discard os.execShellCmd editor & " " & tempFileName & " /dev/tty" var markPart = Time var notes: seq[string] = @[] diff --git a/ptk.nimble b/ptk.nimble index e69266b..227b9e1 100644 --- a/ptk.nimble +++ b/ptk.nimble @@ -1,6 +1,6 @@ # Package -version = "1.0.7" +version = "1.0.8" author = "Jonathan Bernard" description = "Personal Time Keeper" license = "MIT"