Your message dated Tue, 30 Jun 2015 06:52:52 +0200
with message-id <[email protected]>
and subject line Re: irb1.8: Colored prompt breaks terminal width
has caused the Debian Bug report #372659,
regarding irb1.8: Colored prompt breaks terminal width
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
372659: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=372659
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: irb1.8
Version: 1.8.4-3
Severity: minor
Hi
I configured irb to use a colored prompt using escape codes. But it seems
to calculate the terminal width using the size of the prompt string, so the
width is too short (e.g. in a 80x25 terminal the line breaks after 70 chars,
and then continues at the beginning of the same line, writing over the prompt
and already entered text.
I guess escape codes should be stripped first, or maybe readline already
has support for this? The same thing works fine with ipython, which also
uses readline and has a colored prompt.
Here's the relevant part from .irbrc (replace ^[ with escapes):
IRB.conf[:IRB_RC] = proc do |conf|
leader = " " * (conf.irb_name.length + conf.workspace.main.to_s.length + 3)
conf.prompt_i = "%N[%m] ^[[1;34m>>>^[[0m "
conf.prompt_s = leader + " ^[[1;32m..^[[0m "
conf.prompt_n = conf.prompt_c = "%N[%m] ^[[1;32m..^[[0m "
conf.return_format = " ^[[1;31m::^[[0m %s\n"
end
Cheers,
Markus
-- System Information:
Debian Release: testing/unstable
APT prefers unstable
APT policy: (100, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.16
Locale: LANG=C, LC_CTYPE=de_CH (charmap=ISO-8859-1)
Versions of packages irb1.8 depends on:
ii libreadline-ruby1.8 1.8.4-3 Readline interface for Ruby 1.8
ii ruby1.8 1.8.4-3 Interpreter of object-oriented scr
irb1.8 recommends no packages.
-- no debconf information
--- End Message ---
--- Begin Message ---
On Sun, 11 Jun 2006 00:22:26 +0200 markus koller <[email protected]>
wrote:
> Package: irb1.8
> Version: 1.8.4-3
> Severity: minor
Ten years later ruby1.8 is history. Closing the last bug now, assuming
this is fixed in newer versions.
Andreas
--- End Message ---