16 May 15:12
Re: [groovy-user] Customizing GroovySh
From: Strappazzon <benjamin.strappazzon@...>
Subject: Re: [groovy-user] Customizing GroovySh
Newsgroups: gmane.comp.lang.groovy.user
Date: 2008-05-16 13:12:08 GMT
Subject: Re: [groovy-user] Customizing GroovySh
Newsgroups: gmane.comp.lang.groovy.user
Date: 2008-05-16 13:12:08 GMT
Guillaume Laforge a écrit : > Hi Benjamin, > > On Fri, May 16, 2008 at 2:19 PM, Strappazzon > <benjamin.strappazzon@...> wrote: > >> I currently work on a project that aims to develop a shell. >> I use groovySh as a base and add my own command. >> > > Excellent! > In Groovy 1.6-beta-1, I think it's now easier to register your own commands. > Have you used that mechanism? > Which version do you use? > I use groovy 1.5.6 and create a class that implements org.codehaus.groovy.tools.shell.Command then I construct a groovysh instance and register my command in it. Everything works very well, I can execute my command and it appears on the help. However I'm going to try groovy 1.6-beta-1 if it is even easier. || > >> I already succeed in adding commands in groovysh but, now >> what I'd like to do is to customize the prompt and the banner message. >> I tried to extends GroovySh to provide my own prompt but the the method that >> define it is private. >> Is there another solution to customize the prompt and the banner without >> modifying groovy source code. >> > > Currently, if the method is private, you obviously can't override it. > But if you create a JIRA issue with such a request for improvement, > it's an easy fix if it's just making the method public! > > Thank you, I'm going to create the JIRA issue --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
RSS Feed