diff options
| author | Akshay Nair <phenax5@gmail.com> | 2026-06-23 00:50:21 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2026-06-23 00:50:21 +0530 |
| commit | 7502d1e84ae9956356e1578f65d11a8326ce3ec0 (patch) | |
| tree | d5f9140d2e4ffcd57df971b2b27dc655b7a6294c /scripts/fnl | |
| parent | e254ac67272707644be53aa1eb296917651a1771 (diff) | |
| download | kakoune-config-7502d1e84ae9956356e1578f65d11a8326ce3ec0.tar.gz kakoune-config-7502d1e84ae9956356e1578f65d11a8326ce3ec0.zip | |
Refactor fennel scripts to babashka clojure
Diffstat (limited to 'scripts/fnl')
| -rw-r--r-- | scripts/fnl/lib.fnl | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/scripts/fnl/lib.fnl b/scripts/fnl/lib.fnl deleted file mode 100644 index 100b447..0000000 --- a/scripts/fnl/lib.fnl +++ /dev/null @@ -1,32 +0,0 @@ -(local M {}) - -(lambda M.contains? [tbl elem] - (not= nil (table.index-of tbl elem))) - -(lambda M.index-of [tbl elem] - (each [idx value (pairs tbl)] - (when (= value elem) (lua "return idx"))) - nil) - -(lambda M.exec [cmd args] - (var argstr "") - (each [_ arg (ipairs args)] - (set argstr (.. argstr " \"" (string.gsub arg "\"" "\\\"") "\""))) - (local code (os.execute (.. cmd argstr)))) - -(lambda M.read-lines [filepath] - (local file (io.open filepath :r)) - (if file - (do - (local lines []) - (each [line (file:lines)] (table.insert lines line)) - (file:close) - lines) - [])) - -(lambda M.write-lines [filepath lines] - (local file (io.open filepath :w)) - (file:write (table.concat lines "\n")) - (file:close)) - -M |
