[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: [PATCH] Display full hostname in prompt with \H.
From:       Arnaud_Rébillout <rebillout () syscom ! ch>
Date:       2013-03-28 16:18:24
Message-ID: 51546D50.3010900 () syscom ! ch
[Download RAW message or body]

Cool, thanks for the list of supported escape sequences also.

Regards

On 03/28/2013 01:21 PM, Denys Vlasenko wrote:
> On Wed, Mar 27, 2013 at 5:46 PM, Arnaud Rébillout<rebillout@syscom.ch>  wrote:
>> I don't know whether this patch is of any interest, except for me.
>>
>> Signed-off-by: Arnaud Rébillout<rebillout@syscom.ch>
>> ---
>>   libbb/lineedit.c |    3 +++
>>   1 file changed, 3 insertions(+)
>>
>> diff --git a/libbb/lineedit.c b/libbb/lineedit.c
>> index 52b49e8..536a98c 100644
>> --- a/libbb/lineedit.c
>> +++ b/libbb/lineedit.c
>> @@ -1802,6 +1802,9 @@ static void parse_and_put_prompt(const char *prmt_ptr)
>>                                          pbuf = user_buf ? user_buf : (char*)"";
>>                                          break;
>>   # endif
>> +                               case 'H':
>> +                                       pbuf = free_me = safe_gethostname();
>> +                                       break;
>>                                  case 'h':
>>                                          pbuf = free_me = safe_gethostname();
>>                                          *strchrnul(pbuf, '.') = '\0';
>> --
>> 1.7.10.4
>
> Thanks! I implemented it a bit differently. Please try current git.
>


-- 
Arnaud Rébillout
SYSCOM Instruments SA
rue de l'industrie 21
CH-1450 Sainte-Croix
Switzerland
Tel: +41 (0)24 455 44 11

_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic