syntax enhancement for cli boolean operation parameters

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

syntax enhancement for cli boolean operation parameters

Alexey Loubyansky
Just a brief announcement of a syntax enhancement in the CLI for boolean
parameters in operation requests. Just to advertise it and avoid
confusion with the changes in the tab-completion.

It's been quite some time ago since somebody (probably Kabir) gave me an
idea of how we could enhance the syntax for boolean parameters set to true.
I.e. instead of typing :read-resource(recursive=true) all the time
:read-resource(recursive) should be enough.

So, the presence of a boolean parameter name w/o a value would mean the
parameter is implicitly set by the user to true.

While I liked the idea, I never actually implemented it. So I mentioned
it to Jeff (jfdenise) who is getting his hands on the CLI now and he
went ahead and did it.

So now

:read-resource(recursive) is equivalent to :read-resource(recursive=true)

Both syntaxes are allowed.

False is still set explicitly, i.g. :read-resource(recursive=false)

The absence of the parameter still means the parameter was not provided
by the user.

Tab-completion has also been enhanced to suggest the shorter form for
true and still suggests the explicit form for false.

We hope you'll like it. Thanks Jeff for actually implementing it!

Alexey
_______________________________________________
wildfly-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/wildfly-dev
Reply | Threaded
Open this post in threaded view
|

Re: syntax enhancement for cli boolean operation parameters

kkhan

> On 26 Apr 2016, at 20:19, Alexey Loubyansky <[hidden email]> wrote:
>
> Just a brief announcement of a syntax enhancement in the CLI for boolean
> parameters in operation requests. Just to advertise it and avoid
> confusion with the changes in the tab-completion.
>
> It's been quite some time ago since somebody (probably Kabir) gave me an
> idea of how we could enhance the syntax for boolean parameters set to true.
> I.e. instead of typing :read-resource(recursive=true) all the time
> :read-resource(recursive) should be enough.
>
> So, the presence of a boolean parameter name w/o a value would mean the
> parameter is implicitly set by the user to true.
>
> While I liked the idea, I never actually implemented it. So I mentioned
> it to Jeff (jfdenise) who is getting his hands on the CLI now and he
> went ahead and did it.
>
> So now
>
> :read-resource(recursive) is equivalent to :read-resource(recursive=true)
>
> Both syntaxes are allowed.
>
> False is still set explicitly, i.g. :read-resource(recursive=false)
Could that be abbreviated as well? To for example
:read-resource(!recursive)

I don't know if the new reserved character would have a negative impact though

>
> The absence of the parameter still means the parameter was not provided
> by the user.
>
> Tab-completion has also been enhanced to suggest the shorter form for
> true and still suggests the explicit form for false.
>
> We hope you'll like it. Thanks Jeff for actually implementing it!
>
> Alexey
> _______________________________________________
> wildfly-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/wildfly-dev


_______________________________________________
wildfly-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/wildfly-dev
Reply | Threaded
Open this post in threaded view
|

Re: syntax enhancement for cli boolean operation parameters

Heiko Braun
In reply to this post by Alexey Loubyansky

A small useful enhancement when you use the CLI daily

> Am 26.04.2016 um 21:19 schrieb Alexey Loubyansky <[hidden email]>:
>
> Just a brief announcement of a syntax enhancement in the CLI for boolean
> parameters in operation requests. Just to advertise it and avoid
> confusion with the changes in the tab-completion.
>
> It's been quite some time ago since somebody (probably Kabir) gave me an
> idea of how we could enhance the syntax for boolean parameters set to true.
> I.e. instead of typing :read-resource(recursive=true) all the time
> :read-resource(recursive) should be enough.
>
> So, the presence of a boolean parameter name w/o a value would mean the
> parameter is implicitly set by the user to true.
>
> While I liked the idea, I never actually implemented it. So I mentioned
> it to Jeff (jfdenise) who is getting his hands on the CLI now and he
> went ahead and did it.
>
> So now
>
> :read-resource(recursive) is equivalent to :read-resource(recursive=true)
>
> Both syntaxes are allowed.
>
> False is still set explicitly, i.g. :read-resource(recursive=false)
>
> The absence of the parameter still means the parameter was not provided
> by the user.
>
> Tab-completion has also been enhanced to suggest the shorter form for
> true and still suggests the explicit form for false.
>
> We hope you'll like it. Thanks Jeff for actually implementing it!
>
> Alexey
> _______________________________________________
> wildfly-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/wildfly-dev


_______________________________________________
wildfly-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/wildfly-dev
Reply | Threaded
Open this post in threaded view
|

Re: syntax enhancement for cli boolean operation parameters

Jean-Francois Denise
In reply to this post by kkhan
Hi Kabir,
I just logged https://issues.jboss.org/browse/WFCORE-1514
I have started to work on it.
Thanks.
JF

On 26/04/16 21:27, Kabir Khan wrote:

>> On 26 Apr 2016, at 20:19, Alexey Loubyansky <[hidden email]> wrote:
>>
>> Just a brief announcement of a syntax enhancement in the CLI for boolean
>> parameters in operation requests. Just to advertise it and avoid
>> confusion with the changes in the tab-completion.
>>
>> It's been quite some time ago since somebody (probably Kabir) gave me an
>> idea of how we could enhance the syntax for boolean parameters set to true.
>> I.e. instead of typing :read-resource(recursive=true) all the time
>> :read-resource(recursive) should be enough.
>>
>> So, the presence of a boolean parameter name w/o a value would mean the
>> parameter is implicitly set by the user to true.
>>
>> While I liked the idea, I never actually implemented it. So I mentioned
>> it to Jeff (jfdenise) who is getting his hands on the CLI now and he
>> went ahead and did it.
>>
>> So now
>>
>> :read-resource(recursive) is equivalent to :read-resource(recursive=true)
>>
>> Both syntaxes are allowed.
>>
>> False is still set explicitly, i.g. :read-resource(recursive=false)
> Could that be abbreviated as well? To for example
> :read-resource(!recursive)
>
> I don't know if the new reserved character would have a negative impact though
>
>> The absence of the parameter still means the parameter was not provided
>> by the user.
>>
>> Tab-completion has also been enhanced to suggest the shorter form for
>> true and still suggests the explicit form for false.
>>
>> We hope you'll like it. Thanks Jeff for actually implementing it!
>>
>> Alexey
>> _______________________________________________
>> wildfly-dev mailing list
>> [hidden email]
>> https://lists.jboss.org/mailman/listinfo/wildfly-dev
>
> _______________________________________________
> wildfly-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/wildfly-dev

_______________________________________________
wildfly-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/wildfly-dev