summaryrefslogtreecommitdiff
path: root/cowsay/cowsay.lua
blob: 3aa1e6fde7ba3223c47a69e309450555e39a8e4c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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