Add drop, sort commands, start tail command; implement support for destructuredOrLines match type; misc fixes
This commit is contained in:
@@ -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' ) {
|
||||
|
||||
Reference in New Issue
Block a user