Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- pattern: ^#\s*$|^#([0-9]+|g)(,([0-9]+))?\s+(.*)
- code:
- local arg1 = matches[2]
- local arg2 = matches[4]
- local cmd = matches[5]
- if arg1 == nil then
- cecho([[
- #iterators
- #1 cmd @
- #1,3 cmd @
- #g cmd @
- ]])
- else
- if tonumber(arg1) then
- local q1, q2
- if tonumber(arg2) then
- q1,q2 = arg1,arg2
- else
- q1,q2 = 1,arg1
- end
- for i=q1,q2 do
- local icmd = cmd:gsub("@",tostring(i))
- expandAlias(icmd)
- end
- elseif arg1 == "g" then
- for k,v in pairs(msdp.GROUP) do
- local icmd = cmd:gsub("@",v.NAME)
- expandAlias(icmd)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement