NetBSD Problem Report #53856
From www@NetBSD.org Thu Jan 10 17:54:10 2019
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id D91AA7A1A3
for <gnats-bugs@gnats.NetBSD.org>; Thu, 10 Jan 2019 17:54:09 +0000 (UTC)
Message-Id: <20190110175408.DB9C37A27D@mollari.NetBSD.org>
Date: Thu, 10 Jan 2019 17:54:08 +0000 (UTC)
From: paco@voltanet.io
Reply-To: paco@voltanet.io
To: gnats-bugs@NetBSD.org
Subject: editline/libedit not prompting colors in readline mode
X-Send-Pr-Version: www-1.0
>Number: 53856
>Category: lib
>Synopsis: editline/libedit not prompting colors in readline mode
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: lib-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Jan 10 17:55:00 +0000 2019
>Closed-Date: Fri Feb 01 02:32:51 +0000 2019
>Last-Modified: Fri Feb 01 02:32:51 +0000 2019
>Originator: F. Aragon
>Release: default branch
>Organization:
Volta Networks Inc
>Environment:
Any
>Description:
Using the readline emulation mode, the rl_initialize() function should call el_set() with EL_PROMPT_ESC instead of EL_PROMPT, so ANSI escape sequences get interpreted.
>How-To-Repeat:
Trivial
>Fix:
diff a/src/lib/libedit/readline.c b/src/lib/libedit/readline.c
--- a/src/lib/libedit/readline.c
+++ b/src/lib/libedit/readline.c
@@ -323,7 +323,7 @@ rl_initialize(void)
el_end(e);
return -1;
}
- el_set(e, EL_PROMPT, _get_prompt, RL_PROMPT_START_IGNORE);
+ el_set(e, EL_PROMPT_ESC, _get_prompt, RL_PROMPT_START_IGNORE);
el_set(e, EL_SIGNAL, rl_catch_signals);
>Release-Note:
>Audit-Trail:
From: "Christos Zoulas" <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/53856 CVS commit: src/lib/libedit
Date: Thu, 10 Jan 2019 13:41:56 -0500
Module Name: src
Committed By: christos
Date: Thu Jan 10 18:41:56 UTC 2019
Modified Files:
src/lib/libedit: readline.c
Log Message:
PR/53856: F. Aragon: editline/libedit not prompting colors in readline mode
To generate a diff of this commit:
cvs rdiff -u -r1.148 -r1.149 src/lib/libedit/readline.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->closed
State-Changed-By: snj@NetBSD.org
State-Changed-When: Fri, 01 Feb 2019 02:32:51 +0000
State-Changed-Why:
christos committed your patch. thanks!
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.