all repos — min @ d09f14619013d89c694d8083cb5f875b08313ef7

A small but practical concatenative programming language.

Moved environment variable retrieval code to env file.
h3rald h3rald@h3rald.com
Sun, 09 Dec 2018 17:24:50 +0100
commit

d09f14619013d89c694d8083cb5f875b08313ef7

parent

e9b75a85c5cf54944b4de9c9cf3456762c8f4862

4 files changed, 14 insertions(+), 14 deletions(-)

jump to
M core/consts.nimcore/consts.nim

@@ -1,20 +1,6 @@

-import - os - const pkgName* = "min" pkgVersion* = "0.19.3" pkgAuthor* = "Fabio Cevasco" pkgDescription* = "A tiny concatenative programming language and shell." - -var HOME*: string -if defined(windows): - HOME = getenv("USERPROFILE") -if not defined(windows): - HOME = getenv("HOME") - -let MINRC* = HOME / ".minrc" -let MINSYMBOLS* = HOME / ".min_symbols" -let MINHISTORY* = HOME / ".min_history" -let MINLIBS* = HOME / ".minlibs"
A core/env.nim

@@ -0,0 +1,12 @@

+import os + +var HOME*: string +if defined(windows): + HOME = getenv("USERPROFILE") +if not defined(windows): + HOME = getenv("HOME") + +let MINRC* = HOME / ".minrc" +let MINSYMBOLS* = HOME / ".min_symbols" +let MINHISTORY* = HOME / ".min_history" +let MINLIBS* = HOME / ".minlibs"
M lib/min_lang.nimlib/min_lang.nim

@@ -8,6 +8,7 @@ json,

os, logging import + ../core/env, ../core/consts, ../core/parser, ../core/value,
M min.nimmin.nim

@@ -15,6 +15,7 @@

import packages/nimline/nimline, packages/niftylogger, + core/env, core/consts, core/parser, core/value,