You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Kit Plummer <ki...@gmail.com> on 2010/11/05 19:29:47 UTC

Change "karaf@root>" prompt?

Is it possible to change the "karaf" part of the console prompt in
configuration?

Kit
-- 
View this message in context: http://karaf.922171.n3.nabble.com/Change-karaf-root-prompt-tp1849999p1849999.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Change "karaf@root>" prompt?

Posted by Guillaume Nodet <gn...@gmail.com>.
You're right.  The correct value for karaf 2.1.0 would be:

PROMPT= '\u001B\\[1m${USER}\u001B\\[0m@${APPLICATION}> ';

Though the value I provided will work on 2.2.0 (trunk for now).

On Fri, Nov 5, 2010 at 21:15, Mike Van <mv...@comcast.net> wrote:
>
>
>
> Guillaume,
>
>
>
> Are you sure that's correct? I added:
>
> PROMPT="\u001B[1m${USER}\u001B[0m@${APPLICATION}> ";
>
> to my shell.init.script file, and I received the following error in the console:
>
> Error in initialization script: Eof found in the middle of a compound for '][', begins at B[0m@${APPLICATION}>
>
>
>
> v/r,
>
>
>
> Mike Van
>
>
> ----- Original Message -----
> From: "Guillaume Nodet [via Karaf]" <ml...@n3.nabble.com>
> To: "Mike Van" <mv...@comcast.net>
> Sent: Friday, November 5, 2010 3:07:07 PM
> Subject: Re: Change "karaf@root>" prompt?
>
> The default PROMPT is defined as:
>
>     public static final String DEFAULT_PROMPT =
> "\u001B[1m${USER}\u001B[0m@${APPLICATION}> ";
>
> To change this, you can set the PROMPT variable in
> etc/shell.init.script to something that suit your needs better.
> Either as a plain variable:
>    PROMPT="\u001B[1m${USER}\u001B[0m@${APPLICATION}> ";
> Or as a closure
>     '#PROMPT' = { echo "\u001B[1m${USER}\u001B[0m@${APPLICATION}ww> " }
>
> The branding does not currently enable changing the default prompt,
> but maybe it could be enhanced.
>
> On Fri, Nov 5, 2010 at 19:29, Kit Plummer < [hidden email] > wrote:
>>
>> Is it possible to change the "karaf" part of the console prompt in
>> configuration?
>>
>> Kit
>> --
>> View this message in context: http://karaf.922171.n3.nabble.com/Change-karaf-root-prompt-tp1849999p1849999.html
>> Sent from the Karaf - User mailing list archive at Nabble.com.
>>
>
>
>
> --
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
> ------------------------
> Open Source SOA
> http://fusesource.com
>
>
>
>
>
>
> View message @ http://karaf.922171.n3.nabble.com/Change-karaf-root-prompt-tp1849999p1850211.html
> To start a new topic under Karaf - User, email ml-node+930749-917263437-228489@n3.nabble.com
> To unsubscribe from Karaf - User, click here .
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/Change-karaf-root-prompt-tp1849999p1850561.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>



-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
Open Source SOA
http://fusesource.com

Re: Change "karaf@root>" prompt?

Posted by Mike Van <mv...@comcast.net>.


Guillaume, 



Are you sure that's correct? I added: 

PROMPT="\u001B[1m${USER}\u001B[0m@${APPLICATION}> "; 

to my shell.init.script file, and I received the following error in the console: 

Error in initialization script: Eof found in the middle of a compound for '][', begins at B[0m@${APPLICATION}> 



v/r, 



Mike Van 


----- Original Message ----- 
From: "Guillaume Nodet [via Karaf]" <ml...@n3.nabble.com> 
To: "Mike Van" <mv...@comcast.net> 
Sent: Friday, November 5, 2010 3:07:07 PM 
Subject: Re: Change "karaf@root>" prompt? 

The default PROMPT is defined as: 

    public static final String DEFAULT_PROMPT = 
"\u001B[1m${USER}\u001B[0m@${APPLICATION}> "; 

To change this, you can set the PROMPT variable in 
etc/shell.init.script to something that suit your needs better. 
Either as a plain variable: 
   PROMPT="\u001B[1m${USER}\u001B[0m@${APPLICATION}> "; 
Or as a closure 
    '#PROMPT' = { echo "\u001B[1m${USER}\u001B[0m@${APPLICATION}ww> " } 

The branding does not currently enable changing the default prompt, 
but maybe it could be enhanced. 

On Fri, Nov 5, 2010 at 19:29, Kit Plummer < [hidden email] > wrote: 
> 
> Is it possible to change the "karaf" part of the console prompt in 
> configuration? 
> 
> Kit 
> -- 
> View this message in context: http://karaf.922171.n3.nabble.com/Change-karaf-root-prompt-tp1849999p1849999.html 
> Sent from the Karaf - User mailing list archive at Nabble.com. 
> 



-- 
Cheers, 
Guillaume Nodet 
------------------------ 
Blog: http://gnodet.blogspot.com/ 
------------------------ 
Open Source SOA 
http://fusesource.com 






View message @ http://karaf.922171.n3.nabble.com/Change-karaf-root-prompt-tp1849999p1850211.html 
To start a new topic under Karaf - User, email ml-node+930749-917263437-228489@n3.nabble.com 
To unsubscribe from Karaf - User, click here . 

-- 
View this message in context: http://karaf.922171.n3.nabble.com/Change-karaf-root-prompt-tp1849999p1850561.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Change "karaf@root>" prompt?

Posted by Guillaume Nodet <gn...@gmail.com>.
The default PROMPT is defined as:

    public static final String DEFAULT_PROMPT =
"\u001B[1m${USER}\u001B[0m@${APPLICATION}> ";

To change this, you can set the PROMPT variable in
etc/shell.init.script to something that suit your needs better.
Either as a plain variable:
   PROMPT="\u001B[1m${USER}\u001B[0m@${APPLICATION}> ";
Or as a closure
    '#PROMPT' = { echo "\u001B[1m${USER}\u001B[0m@${APPLICATION}ww> " }

The branding does not currently enable changing the default prompt,
but maybe it could be enhanced.

On Fri, Nov 5, 2010 at 19:29, Kit Plummer <ki...@gmail.com> wrote:
>
> Is it possible to change the "karaf" part of the console prompt in
> configuration?
>
> Kit
> --
> View this message in context: http://karaf.922171.n3.nabble.com/Change-karaf-root-prompt-tp1849999p1849999.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>



-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
Open Source SOA
http://fusesource.com