Bug 197362 - databases/postgresql94-client: psql prompt broken broken after update
Summary: databases/postgresql94-client: psql prompt broken broken after update
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: pgsql
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-06 10:44 UTC by gibheer+freebsd
Modified: 2015-02-07 20:38 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description gibheer+freebsd 2015-02-06 10:44:26 UTC
Hi,

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
Hi,

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.

Palle
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...

Palle
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

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

Changes:
  head/databases/postgresql90-client/Makefile
  head/databases/postgresql91-client/Makefile
  head/databases/postgresql91-server/Makefile
  head/databases/postgresql92-client/Makefile
  head/databases/postgresql92-server/Makefile
  head/databases/postgresql93-client/Makefile
  head/databases/postgresql94-client/Makefile
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

Log:
  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

Changes:
  head/databases/postgresql90-server/Makefile
  head/databases/postgresql94-server/Makefile
Comment 8 gibheer+freebsd 2015-02-07 20:38:47 UTC
Thank you very much :) It works now