Rosettea / Hilbish

🌓 The Moon-powered shell! A comfy and extensible shell for Lua fans! 🌺 ✨
https://rosettea.github.io/Hilbish/
MIT License
496 stars 21 forks source link

feat: allow hilbish.run to take a table of files to use for output #291

Closed TorchedSammy closed 4 months ago

TorchedSammy commented 4 months ago

this makes it possible to pipe commands to any output via lua api

usage example:

local fs = require 'fs'

local output = io.open('output.txt', 'w')

hilbish.run('ls', {
    out = output,
    err = output
})

closes #174 since this pr also introduces the pipe function