switch to using shell builtins for thought rendering

This commit is contained in:
2025-06-07 23:30:56 -07:00
parent bc40b225f0
commit 15405bf8a3
9 changed files with 9144 additions and 14 deletions

View File

@ -0,0 +1,11 @@
def _execute_bash(*args):
from re import sub
from os import environ as hy_env
from subprocess import check_output
env = hy_env
env['PATH'] = hy_env['PATH'] + ':./scripts'
path = args[0]
with open(path, 'r') as fp:
_hy_anon_var_1 = fp.read()
print(sub('\\$\\[(.*?)\\]', lambda sequence: check_output(sequence.group(1), shell=True, executable='/bin/bash', env=env).decode().strip(), _hy_anon_var_1))
return 0