summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cowsay/cowsay.lua23
1 files changed, 23 insertions, 0 deletions
diff --git a/cowsay/cowsay.lua b/cowsay/cowsay.lua
new file mode 100644
index 0000000..3aa1e6f
--- /dev/null
+++ b/cowsay/cowsay.lua
@@ -0,0 +1,23 @@
+
+
+function ascii_nerd( name )
+ local s = ""
+ s = s .. [[
+
+\ | | /
+| o o |
+ \ O /
+ | |
+]]
+ local l = string.len(name)
+ for i=1,l+4 do s = s .. "+" end
+ s = s .. "\n| " .. name .. " |\n"
+ for i=1,l+4 do s = s .. "+" end
+ return s
+end
+
+for k,v in ipairs(arg) do
+ if v == "nerd" then
+ print( ascii_nerd( arg[k+1] ) )
+ end
+end