Compare commits

...

3 Commits

Author SHA1 Message Date
Daniel Barlow b231664a06 anoia: add basename, dirname 2024-04-11 23:11:20 +01:00
Daniel Barlow f4bf3029fa anoia: alphabetize exports 2024-04-11 23:11:13 +01:00
Daniel Barlow 05f2c9a2f7 add lua in nix-shell environment 2024-04-11 23:11:06 +01:00
2 changed files with 19 additions and 1 deletions

View File

@ -76,6 +76,7 @@ in {
min-copy-closure
fennelrepl
lzma
lua
];
};
}

View File

@ -18,6 +18,12 @@
f (do (f:close) true)
_ false))
(fn basename [path]
(string.match path ".*/([^/]-)$"))
(fn dirname [path]
(string.match path "(.*)/[^/]-$"))
(fn system [s]
(match (os.execute s)
res (do (print (.. "Executed \"" s "\", exit code " (tostring res))) res)
@ -66,4 +72,15 @@
(s:sub 1 (- (# s) pad))))
{ : assoc : merge : split : file-exists? : system : hash : base64url : dup }
{
: assoc
: base64url
: basename
: dirname
: dup
: file-exists?
: hash
: merge
: split
: system
}