all repos — min @ 5250fe069dbdae55743a5e848abb45260148772d

A small but practical concatenative programming language.

Improved file completions.
h3rald h3rald@h3rald.com
Sun, 18 Sep 2016 11:07:33 +0200
commit

5250fe069dbdae55743a5e848abb45260148772d

parent

097438db56cfa262876c46dae71dd2cf0a5fdbab

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

jump to
M minim.nimminim.nim

@@ -77,14 +77,17 @@ if word.startsWith("\""):

var f = word[1..^1] if f == "": f = getCurrentDir().replace("\\", "/") - return toSeq(f.walkDir).mapIt("\"$1\"" % it.path.replace("\\", "/")) + return toSeq(walkDir(f, true)).mapIt("\"$1\"" % it.path.replace("\\", "/")) elif f.dirExists: f = f.replace("\\", "/") - return toSeq(f.walkDir).mapIt("\"$1\"" % it.path.replace("\\", "/")) + if f[f.len-1] != '/': + f = f & "/" + return toSeq(walkDir(f, true)).mapIt("\"$1$2\"" % [f, it.path.replace("\\", "/")]) else: let dir = f.parentDir + let file = f.extractFileName if dir.existsDir: - return toSeq(dir.walkDir).filterIt(it.path.startsWith(f)).mapIt("\"$1\"" % it.path.replace("\\", "/")) + return toSeq(walkDir(dir, true)).filterIt(it.path.startsWith(file)).mapIt("\"$1/$2\"" % [dir, it.path.replace("\\", "/")]) return symbols proc stdLib(i: In) =