Add drop, sort commands, start tail command; implement support for destructuredOrLines match type; misc fixes

This commit is contained in:
2026-03-02 22:20:18 -06:00
parent e5acc2e8b1
commit d5d69e58a4
10 changed files with 224 additions and 8 deletions

View File

@@ -2,12 +2,15 @@ import {StrRVal} from "./commands/command.js";
import {Awaitable} from "../util/types.js";
import childProcess from "node:child_process";
import fs from "node:fs";
import crypto from "node:crypto";
import {tempFile} from "../util/fs.js";
export const getSubjectDisplay = (sub: StrRVal): string => {
if ( sub.term === 'string' ) {
return sub.value
const lines = sub.value.split('\n')
const padLength = `${lines.length}`.length // heh
return lines
.map((line, idx) => idx.toString().padStart(padLength, ' ') + ' ⎸' + line)
.join('\n')
}
if ( sub.term === 'int' ) {