lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Little tweak, lapp.c in line 248 -

                    if parmstr:find('^%a[^%s]+') then
                        -- a short option followed by a non space?
(exception for AW ;))

So space or no space works with short options on either numbers or strings.

Cheers
AW

On Tue, Mar 10, 2009 at 11:13 AM, Andrew Wilson <agrwagrw@gmail.com> wrote:
> Even better. Great example of Lua's simple, small, powerful philosophy. Andrew
>
> On Tue, Mar 10, 2009 at 7:22 AM, steve donovan
> <steve.j.donovan@gmail.com> wrote:
>> On Mon, Mar 9, 2009 at 4:07 PM, Andrew Wilson <agrwagrw@gmail.com> wrote:
>>> Steve, Nice little module, some behaviors a little unexpected? If no
>>> parameters entered at all I'd expect help to be displayed. Also expect
>>> numbers to parse with or without space. Great idea, good fit with Lua.
>>
>> There's a fixed-up version addressing these issues.
>>
>> Plus some extra features I couldn't resist, like explict range
>> constraints and vararg parameters.
>>
>> There was a horrendous bug where the damned thing was interpreting
>> '-2' as a flag ;)
>>
>> http://lua-users.org/wiki/LappFramework
>>
>> steve d.
>>
>