all repos — min @ 880bd397e25c6a1de1f924325b6f1b423b2189ed

A small but practical concatenative programming language.

minpkg/core/env.nim

 1
 2
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
import 
  os, 
  ../packages/nimline/nimline
  
var HOME*: string
if defined(windows):
  HOME = getenv("USERPROFILE")
if not defined(windows):
  HOME = getenv("HOME")

var MINRC* {.threadvar.}: string
MINRC = HOME / ".minrc" 
var MINSYMBOLS* {.threadvar.}: string 
MINSYMBOLS = HOME / ".min_symbols"
var MINHISTORY* {.threadvar.}: string
MINHISTORY = HOME / ".min_history"
var EDITOR* {.threadvar.}: LineEditor
EDITOR = initEditor(historyFile = MINHISTORY)
var MINCOMPILED* {.threadvar.}: bool
MINCOMPILED = false
var DEV* {.threadvar.}: bool
DEV = false