all repos — min @ 882366e6f8ccda2a91614027e9e5f4ab17d5dccf

A small but practical concatenative programming language.

Removed executable autocompletion.
h3rald h3rald@h3rald.com
Sat, 28 Oct 2023 14:42:35 +0200
commit

882366e6f8ccda2a91614027e9e5f4ab17d5dccf

parent

66cc73dbfd678f054f64a4363727c9d0180619d8

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

jump to
M min.nimmin.nim

@@ -55,18 +55,6 @@

if logging.getHandlers().len == 0: newNiftyLogger().addHandler() -proc getExecs(): seq[string] = - var res = newSeq[string](0) - let getFiles = proc(dir: string) = - for c, s in walkDir(dir, true): - if (c == pcFile or c == pcLinkToFile) and not res.contains(s): - 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] = var words = ed.lineText.split(" ") var word: string

@@ -94,18 +82,6 @@ if word.startsWith("<"):

return toSeq(MINSYMBOLS.readFile.parseJson.pairs).mapIt("<" & $it[0]) if word.startsWith("$"): return toSeq(envPairs()).mapIt("$" & $it[0]) - if word.startsWith("!"): - return getExecs().mapIt("!" & $it) - if word.startsWith("!!"): - return getExecs().mapIt("!!" & $it) - if word.startsWith("!\""): - return getExecs().mapIt("!\"" & $it) - if word.startsWith("!!\""): - return getExecs().mapIt("!!\"" & $it) - if word.startsWith("&\""): - return getExecs().mapIt("&\"" & $it) - if word.startsWith("&"): - return getExecs().mapIt("&" & $it) if word.startsWith("\""): var f = word[1..^1] if f == "":
M next-release.mdnext-release.md

@@ -1,6 +1,7 @@

### BREAKING CHANGES * SSL is now enabled by default when installing via nimble and when compiling by default. Use `-d:nossl` to disable. +* The min shell no longer attempts to auto-complete executables (it never worked properly anyway). ### New Features
M site/contents/learn-shell.mdsite/contents/learn-shell.md

@@ -28,7 +28,6 @@

Context | Result ---------------------------------------------------------------|-------------- ...a string | Auto-completes the current word using file and directory names. -...a word starting with `!`, `!!`, `!"` `!!"`, `&`, `&"` | Auto-completes the current word using executable file names. ...a word starting with `$` | Auto-completes the current word using environment variable names. ...a word starting with `'`, `@`, `#`, `>`, `<`, `*`, `(`, `?` | Auto-completes the current word using symbol names.