Phase 2, first part: values and value commands
- Values are Json of (text json); a record is JsonFields. - Value commands: files, procs, open, where, select, get, sort-by, first, last, count, reverse, uniq, lines, from-json, to-json, from-csv, to-csv, each with a short name. - Value commands next to each other run as one unit: a (std run) filter in a job, or in the shell when a line has no program. - Records are shown as a table; values go to programs as lines. - A name is a shell command, a short name, a program on PATH, then a long name. - 2>&1, with >FILE 2>&1. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
3518b7711d
commit
027acc84e6
12 changed files with 1142 additions and 37 deletions
|
|
@ -15,6 +15,7 @@
|
|||
(import (bjoterm line))
|
||||
(import (bjosh syntax))
|
||||
(import (bjosh builtins))
|
||||
(import (bjosh commands))
|
||||
|
||||
(export input-done? complete word-start command-position? quote-name file-candidates)
|
||||
|
||||
|
|
@ -93,7 +94,7 @@
|
|||
(go (+ i 1) (vec-append all (path-names (vec-ref dirs i)))))))
|
||||
(vec-map (fun (n) (str (quote-name n) " "))
|
||||
(sorted-distinct (vec-filter (fun (n) (string-starts-with? n prefix))
|
||||
(vec-append builtin-names programs)))))
|
||||
(vec-append (vec-append builtin-names (value-names)) programs)))))
|
||||
|
||||
;; `names` sorted, each once.
|
||||
(: (-> (Vec string) (Vec string)))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue