Fixed exec completions.
h3rald h3rald@h3rald.com
Fri, 23 Sep 2016 23:07:34 +0200
1 files changed,
5 insertions(+),
3 deletions(-)
jump to
M
minim.nim
→
minim.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 == "":