Bug 197362

Summary: databases/postgresql94-client: psql prompt broken broken after update
Product: Ports & Packages Reporter: gibheer+freebsd
Component: Individual Port(s)Assignee: pgsql
Status: Closed FIXED    
Severity: Affects Some People CC: bapt, girgen
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   

Description gibheer+freebsd 2015-02-06 10:44:26 UTC

After the upgrade to postgresql client 9.4.1, the revision 378500 also replaced readline with libedit. Now the color codes stopped working for me.

My prompt now looks like:
[1;33m11:41:22 [1;33m[1;34mgibheer[1;30m-[1;34m[local][1;30m/[1;34m~[1;33m=[0m

To reproduce the problem, use the following command

  \set PROMPT1 '%[%033[1;33m%]%x%[%033[1;34m%]%n%[%033[1;30m%]-%[%033[1;34m%]%M%[%033[1;30m%]/%[%033[1;34m%]%~%[%033[1;33m%]%R%[%033[0m%] '

Maybe it is possible to add an option, wether to use libedit or libreadline?

Thank you
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2015-02-07 04:22:38 UTC
Fix Summary and assign.
Comment 2 Palle Girgensohn freebsd_committer 2015-02-07 09:45:29 UTC

I'm checking this problem with some libedit peaople. The probable reason is that libesdit does not support the colour codes, it is not 100% compatible with reasdline.

Problaby, we will end up reverting the change to using libedit, or libedit will resolve the problem.

Comment 3 Palle Girgensohn freebsd_committer 2015-02-07 10:16:27 UTC
Hmm, I'm restructuring the client ports to just optionally replacing readline with editline(libedit), instead of making libedit default. libedit does not have all the bells and whistles of readline, and if you don't care about the license but do care about the bells and whistles, you should not suffer... :)

Takes a few hours to run through poudriere and stuff...

Comment 4 Baptiste Daroussin freebsd_committer 2015-02-07 11:28:30 UTC
I'll see what I can do on the libedit front
Comment 5 commit-hook freebsd_committer 2015-02-07 17:06:07 UTC
A commit references this bug:

Author: girgen
Date: Sat Feb  7 17:05:10 UTC 2015
New revision: 378604
URL: https://svnweb.freebsd.org/changeset/ports/378604

  Revert the change from readline to libedit, and instead make libedit optional.
  PR:	ports/197362

Comment 6 Palle Girgensohn freebsd_committer 2015-02-07 17:10:21 UTC
I reverted the shift from readline to libedit. Instead, I made it an option to use libedit instead of readline.
Comment 7 commit-hook freebsd_committer 2015-02-07 17:19:14 UTC
A commit references this bug:

Author: girgen
Date: Sat Feb  7 17:18:49 UTC 2015
New revision: 378608
URL: https://svnweb.freebsd.org/changeset/ports/378608

  In previous commit,
  "Revert the change from readline to libedit, and instead make libedit optional.",
  I failed to get the PORTREVISION set correctly. Fixed now.

  PR:	ports/197362

Comment 8 gibheer+freebsd 2015-02-07 20:38:47 UTC
Thank you very much :) It works now