all repos — min @ 38c009384153ca021434a81434e5055d162a7112

A small but practical concatenative programming language.

Fixed exec completions.
h3rald h3rald@h3rald.com
Fri, 23 Sep 2016 23:07:34 +0200
commit

38c009384153ca021434a81434e5055d162a7112

parent

dc7e6435d97723604c7f83ffbf4e023d6790a61a

1 files changed, 5 insertions(+), 3 deletions(-)

jump to
M minim.nimminim.nim

@@ -5,7 +5,8 @@ parseopt2,

strutils, os, json, - sequtils + sequtils, + algorithm import core/linedit, core/consts,

@@ -51,6 +52,7 @@ res.add s

getFiles(getCurrentDir()) for dir in "PATH".getEnv.split(PathSep): getFiles(dir) + res.sort(system.cmp) return res proc getCompletions(ed: LineEditor, symbols: seq[string]): seq[string] =

@@ -77,9 +79,9 @@ return toSeq(MINIMSYMBOLS.readFile.parseJson.pairs).mapIt("<" & $it[0])

if word.startsWith("$"): return toSeq(envPairs()).mapIt("$" & $it[0]) if word.startsWith("!"): - return getExecs().mapIt("!" & $it[0]) + return getExecs().mapIt("!" & $it) if word.startsWith("&"): - return getExecs().mapIt("&" & $it[0]) + return getExecs().mapIt("&" & $it) if word.startsWith("\""): var f = word[1..^1] if f == "":