From 5e543dc9ce2ba10fac087c3fff20d53541843feb Mon Sep 17 00:00:00 2001 From: "Mr. Robot" Date: Sat, 17 Apr 2021 14:54:19 +0200 Subject: [PATCH] add file read and write to zsh --- data/zsh.json | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/data/zsh.json b/data/zsh.json index 42ebf0d..c42bebd 100644 --- a/data/zsh.json +++ b/data/zsh.json @@ -1,5 +1,15 @@ { "functions": { + "file-read": [ + { + "code": "zsh -c 'echo \"$(<[file])\"'\n" + } + ], + "file-write": [ + { + "code": "zsh -c 'echo [data] >[file]'\n" + } + ], "shell": [ { "code": "zsh" @@ -16,4 +26,4 @@ } ] } -} \ No newline at end of file +}