You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@groovy.apache.org by Sistemas Jaguar <sj...@proton.me> on 2025/04/30 12:06:06 UTC
groovysh easily breaks
If an incorrect command is entered the REPL stops working:
Groovy Shell (4.0.26, JVM: 1.8.0_432)
Type ':help' or ':h' for help.--------------------------------------------------------------------------------------------------------
groovy:000> System.getProperty("java.version")
===> 1.8.0_432
groovy:000> println "Hello"
Hello===> null
groovy:000> a=[
groovy:001> println "Hello"
groovy:002> System.getProperty("java.version")
groovy:003> a=[:]
groovy:004>
After 'a=[' other than commands (:command syntax), the REPL seens to break requiring a restart, which is frustrating and time consuming to say the least.
Am I missing something?
Thanks.
Linux kiwi 6.1.0-34-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.135-1 (2025-04-25) x86_64 GNU/Linux
Re: groovysh easily breaks
Posted by MG <mg...@arscreat.com>.
Fantastic news, I guess I gotta start using groovysh...
Ch;-)eers,
mg
On 03/05/2025 00:06, OCsite wrote:
> MG,
>
> well we got :D. Also we got :S, :x, and :p — just try :?
>
> All the best,
> OC
>
>> On 30. 4. 2025, at 17:25, MG <mg...@arscreat.com> wrote:
>>
>> Wait, we have :c - can we also get :o :) :D ...
>>
>> Ch;-)eers,
>> mg
>>
>> On 30/04/2025 14:22, OCsite wrote:
>>> Well either the following code makes sense, in which case it works,
>>> or use :c to cleanup, what's the problem?
>>>
>>> ===
>>> 1068 ocs*~/Projects/WO_XC_2018>* /usr/local/groovy-4.0.24/bin/groovysh
>>> Groovy Shell(4.0.24, JVM: 11.0.4-BellSoft)
>>> Type '*:help*' or '*:h*' for help.
>>> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>>> *groovy:*000*>* a=[
>>> *groovy:*001*>* 1
>>> *groovy:*002*>* ,
>>> *groovy:*003*>* 2
>>> *groovy:*004*>* ]
>>> *===>* [1, 2]
>>> *groovy:*000*>* a=[
>>> *groovy:*001*>* println "oops, forgot the prev cmd"
>>> *groovy:*002*>* :c
>>> *groovy:*000*>* println "okay now"
>>> okay now
>>> *===>* null
>>> *groovy:*000*>*
>>> ===
>>>
>>> The one thing I know of needed to improve groovysh would be to make
>>> sure that the focus remains in Terminal when groovysh is launched.
>>>
>>> All the best,
>>> OC
>>>
>>>> On 30. 4. 2025, at 14:06, Sistemas Jaguar <sj...@proton.me> wrote:
>>>>
>>>> If an incorrect command is entered the REPL stops working:
>>>>
>>>> Groovy Shell (4.0.26, JVM: 1.8.0_432)
>>>> Type ':help' or ':h' for help.
>>>> --------------------------------------------------------------------------------------------------------
>>>> groovy:000> System.getProperty("java.version")
>>>> ===> 1.8.0_432
>>>> groovy:000> println "Hello"
>>>> Hello
>>>> ===> null
>>>> groovy:000> a=[
>>>> groovy:001> println "Hello"
>>>> groovy:002> System.getProperty("java.version")
>>>> groovy:003> a=[:]
>>>> groovy:004>
>>>>
>>>> After 'a=[' other than commands (:command syntax), the REPL seens
>>>> to break requiring a restart, which is frustrating and time
>>>> consuming to say the least.
>>>>
>>>> Am I missing something?
>>>>
>>>> Thanks.
>>>>
>>>> Linux kiwi 6.1.0-34-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.135-1
>>>> (2025-04-25) x86_64 GNU/Linux
>>>
>>
>
Re: groovysh easily breaks
Posted by OCsite <oc...@ocs.cz>.
MG,
well we got :D. Also we got :S, :x, and :p — just try :?
All the best,
OC
> On 30. 4. 2025, at 17:25, MG <mg...@arscreat.com> wrote:
>
> Wait, we have :c - can we also get :o :) :D ...
>
> Ch;-)eers,
> mg
>
> On 30/04/2025 14:22, OCsite wrote:
>> Well either the following code makes sense, in which case it works, or use :c to cleanup, what's the problem?
>>
>> ===
>> 1068 ocs ~/Projects/WO_XC_2018> /usr/local/groovy-4.0.24/bin/groovysh
>> Groovy Shell (4.0.24, JVM: 11.0.4-BellSoft)
>> Type ':help' or ':h' for help.
>> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>> groovy:000> a=[
>> groovy:001> 1
>> groovy:002> ,
>> groovy:003> 2
>> groovy:004> ]
>> ===> [1, 2]
>> groovy:000> a=[
>> groovy:001> println "oops, forgot the prev cmd"
>> groovy:002> :c
>> groovy:000> println "okay now"
>> okay now
>> ===> null
>> groovy:000>
>> ===
>>
>> The one thing I know of needed to improve groovysh would be to make sure that the focus remains in Terminal when groovysh is launched.
>>
>> All the best,
>> OC
>>
>>> On 30. 4. 2025, at 14:06, Sistemas Jaguar <sj...@proton.me> <ma...@proton.me> wrote:
>>>
>>> If an incorrect command is entered the REPL stops working:
>>>
>>> Groovy Shell (4.0.26, JVM: 1.8.0_432)
>>> Type ':help' or ':h' for help.
>>> --------------------------------------------------------------------------------------------------------
>>> groovy:000> System.getProperty("java.version")
>>> ===> 1.8.0_432
>>> groovy:000> println "Hello"
>>> Hello
>>> ===> null
>>> groovy:000> a=[
>>> groovy:001> println "Hello"
>>> groovy:002> System.getProperty("java.version")
>>> groovy:003> a=[:]
>>> groovy:004>
>>>
>>> After 'a=[' other than commands (:command syntax), the REPL seens to break requiring a restart, which is frustrating and time consuming to say the least.
>>>
>>> Am I missing something?
>>>
>>> Thanks.
>>>
>>> Linux kiwi 6.1.0-34-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.135-1 (2025-04-25) x86_64 GNU/Linux
>>
>
Re: groovysh easily breaks
Posted by MG <mg...@arscreat.com>.
Wait, we have :c - can we also get :o :) :D ...
Ch;-)eers,
mg
On 30/04/2025 14:22, OCsite wrote:
> Well either the following code makes sense, in which case it works, or
> use :c to cleanup, what's the problem?
>
> ===
>
> 1068 ocs*~/Projects/WO_XC_2018>* /usr/local/groovy-4.0.24/bin/groovysh
>
> Groovy Shell(4.0.24, JVM: 11.0.4-BellSoft)
>
> Type '*:help*' or '*:h*' for help.
>
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> *groovy:*000*>* a=[
>
> *groovy:*001*>* 1
>
> *groovy:*002*>* ,
>
> *groovy:*003*>* 2
>
> *groovy:*004*>* ]
>
> *===>* [1, 2]
>
> *groovy:*000*>* a=[
>
> *groovy:*001*>* println "oops, forgot the prev cmd"
>
> *groovy:*002*>* :c
>
> *groovy:*000*>* println "okay now"
>
> okay now
>
> *===>* null
>
> *groovy:*000*>*
>
> ===
>
> The one thing I know of needed to improve groovysh would be to make
> sure that the focus remains in Terminal when groovysh is launched.
>
> All the best,
> OC
>
>> On 30. 4. 2025, at 14:06, Sistemas Jaguar <sj...@proton.me> wrote:
>>
>> If an incorrect command is entered the REPL stops working:
>>
>> Groovy Shell (4.0.26, JVM: 1.8.0_432)
>> Type ':help' or ':h' for help.
>> --------------------------------------------------------------------------------------------------------
>> groovy:000> System.getProperty("java.version")
>> ===> 1.8.0_432
>> groovy:000> println "Hello"
>> Hello
>> ===> null
>> groovy:000> a=[
>> groovy:001> println "Hello"
>> groovy:002> System.getProperty("java.version")
>> groovy:003> a=[:]
>> groovy:004>
>>
>> After 'a=[' other than commands (:command syntax), the REPL seens to
>> break requiring a restart, which is frustrating and time consuming to
>> say the least.
>>
>> Am I missing something?
>>
>> Thanks.
>>
>> Linux kiwi 6.1.0-34-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.135-1
>> (2025-04-25) x86_64 GNU/Linux
>
Re: groovysh easily breaks
Posted by OCsite <oc...@ocs.cz>.
Well either the following code makes sense, in which case it works, or use :c to cleanup, what's the problem?
===
1068 ocs ~/Projects/WO_XC_2018> /usr/local/groovy-4.0.24/bin/groovysh
Groovy Shell (4.0.24, JVM: 11.0.4-BellSoft)
Type ':help' or ':h' for help.
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
groovy:000> a=[
groovy:001> 1
groovy:002> ,
groovy:003> 2
groovy:004> ]
===> [1, 2]
groovy:000> a=[
groovy:001> println "oops, forgot the prev cmd"
groovy:002> :c
groovy:000> println "okay now"
okay now
===> null
groovy:000>
===
The one thing I know of needed to improve groovysh would be to make sure that the focus remains in Terminal when groovysh is launched.
All the best,
OC
> On 30. 4. 2025, at 14:06, Sistemas Jaguar <sj...@proton.me> wrote:
>
> If an incorrect command is entered the REPL stops working:
>
> Groovy Shell (4.0.26, JVM: 1.8.0_432)
> Type ':help' or ':h' for help.
> --------------------------------------------------------------------------------------------------------
> groovy:000> System.getProperty("java.version")
> ===> 1.8.0_432
> groovy:000> println "Hello"
> Hello
> ===> null
> groovy:000> a=[
> groovy:001> println "Hello"
> groovy:002> System.getProperty("java.version")
> groovy:003> a=[:]
> groovy:004>
>
> After 'a=[' other than commands (:command syntax), the REPL seens to break requiring a restart, which is frustrating and time consuming to say the least.
>
> Am I missing something?
>
> Thanks.
>
> Linux kiwi 6.1.0-34-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.135-1 (2025-04-25) x86_64 GNU/Linux
Re: groovysh easily breaks
Posted by Sistemas Jaguar <sj...@proton.me>.
On Wednesday, April 30th, 2025 at 6:26 AM, Christopher Smith <ch...@gmail.com> wrote:
> The number after the colon indicates that the shell sees unclosed constructs such as brackets, braces, or parentheses and is waiting for you to close them before executing.
>
> I did not know about :c, which is great to have!
>
> On Wed, Apr 30, 2025, 07:06 Sistemas Jaguar <sj...@proton.me> wrote:
>
>> If an incorrect command is entered the REPL stops working:
>>
>> Groovy Shell (4.0.26, JVM: 1.8.0_432)
>> Type ':help' or ':h' for help.--------------------------------------------------------------------------------------------------------
>>
>> groovy:000> System.getProperty("java.version")
>> ===> 1.8.0_432
>> groovy:000> println "Hello"
>> Hello===> null
>>
>> groovy:000> a=[
>> groovy:001> println "Hello"
>>
>> groovy:002> System.getProperty("java.version")
>> groovy:003> a=[:]
>> groovy:004>
>>
>> After 'a=[' other than commands (:command syntax), the REPL seens to break requiring a restart, which is frustrating and time consuming to say the least.
>>
>> Am I missing something?
>>
>> Thanks.
>>
>> Linux kiwi 6.1.0-34-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.135-1 (2025-04-25) x86_64 GNU/Linux
My bad, thought I had tested by closing the command at a new line (i.e. by means of ':]').
Did not know about ':c', no doubt it will be very useful.
Thanks for your help!
Re: groovysh easily breaks
Posted by Christopher Smith <ch...@gmail.com>.
The number after the colon indicates that the shell sees unclosed
constructs such as brackets, braces, or parentheses and is waiting for you
to close them before executing.
I did not know about :c, which is great to have!
On Wed, Apr 30, 2025, 07:06 Sistemas Jaguar <sj...@proton.me> wrote:
> If an incorrect command is entered the REPL stops working:
>
> Groovy Shell (4.0.26, JVM: 1.8.0_432)
> Type ':help' or ':h' for help.
>
> --------------------------------------------------------------------------------------------------------
> groovy:000> System.getProperty("java.version")
> ===> 1.8.0_432
> groovy:000> println "Hello"
> Hello
> ===> null
> groovy:000> a=[
> groovy:001> println "Hello"
> groovy:002> System.getProperty("java.version")
> groovy:003> a=[:]
> groovy:004>
>
> After 'a=[' other than commands (:command syntax), the REPL seens to break
> requiring a restart, which is frustrating and time consuming to say the
> least.
>
> Am I missing something?
>
> Thanks.
>
> Linux kiwi 6.1.0-34-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.135-1
> (2025-04-25) x86_64 GNU/Linux
>