[zypp-devel] Re: FW: Bug maybe? zypper lu
On Monday 24 August 2009 21:32:17 Vickers, Mark wrote:
What is the cruft before the work "Repository"
zypper lu |less
Reading installed packages... Patches
ESC[?1034hRepository | Name | Version | Category | Status -----------------+------+---------+----------+------- Updates for 11.0 | hal | 620 | security | Needed
zypper --version zypper 0.11.11
Color output your terminal does not seem to support. I have the same problem always with git diff ;-) -- Duncan Mac-Vicar P. - Engineering Manager, YaST SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nuernberg) -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
try 'zypper lu | lv' instead. lv supports ansi escape characters; less does not. This is rather a 'bug' of less than a problem of zypper since a pure 'zypper lu' should give a colored output as well. Coloring makes the output of terminal programs much more readable. I would welcome this to be used much more heavily. If we wanna do sth. about that issue, we should at first install lv by default and perhaps then modify less to interprete ANSI-escape-sequences correctly since that is easier than making all users learn about a new program like lv. For a guide on how to use ANSI-escape-sequences with your own Linux programs just have a look at http://www.elstel.com/ColorConsole (page will go online, soon; in a day or so.). Duncan Mac-Vicar Prett schrieb:
On Monday 24 August 2009 21:32:17 Vickers, Mark wrote:
What is the cruft before the work "Repository"
zypper lu |less
Reading installed packages... Patches
ESC[?1034hRepository | Name | Version | Category | Status -----------------+------+---------+----------+------- Updates for 11.0 | hal | 620 | security | Needed
zypper --version zypper 0.11.11
Color output your terminal does not seem to support. I have the same problem always with git diff ;-)
-- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
Hi, On Tue, 25 Aug 2009, Elmar Stellnberger wrote:
try 'zypper lu | lv' instead. lv supports ansi escape characters; less does not.
less -R will do the right thing (maybe amending LESSANSIENDCHARS), hence just do 'LESS="$LESS -R"' in .bashrc or something. But really, zypper should check isatty(1) before activating color output.
This is rather a 'bug' of less than a problem of zypper since a pure 'zypper lu' should give a colored output as well.
I disagree. less (and similar programs) should _not_ by default interpret ANSI sequences, otherwise looking at files that contain arbitrary binary crap could fiddle with the terminal settings. Optional is okay. Ciao, Michael. -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
On 08/25/2009 09:53 AM, Duncan Mac-Vicar Prett wrote:
On Monday 24 August 2009 21:32:17 Vickers, Mark wrote:
What is the cruft before the work "Repository"
This is some meta-mode switch control sequence sent by readline when it is initialzed. See https://www-old.cae.wisc.edu/pipermail/bug-octave/2008-March/005294.html It's fixed in factory by avoiding readline initialization if the output is not terminal (git show 50e3c8).
zypper lu |less
Reading installed packages... Patches
ESC[?1034hRepository | Name | Version | Category | Status -----------------+------+---------+----------+------- Updates for 11.0 | hal | 620 | security | Needed
zypper --version zypper 0.11.11
Color output your terminal does not seem to support. I have the same problem always with git diff ;-)
-- cheers, jano Ján Kupec YaST team ---------------------------------------------------------(PGP)--- Key ID: 637EE901 Fingerprint: 93B9 C79B 2D20 51C3 800B E09B 8048 46A6 637E E901 ---------------------------------------------------------(IRC)--- Server: irc.freenode.net Nick: jniq Channels: #zypp #yast #suse #susecz ---------------------------------------------------------(EOF)---
Am 04.09.2009 15:28, schrieb Jano Kupec:
s fixed in factory by avoiding readline initialization if the output is not terminal (git show 50e3c8).
Isn`t there any possibility to see if a non-tty recipient understands ANSI-ESC sequences like 'less -R'? -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
Hi, On Fri, 4 Sep 2009, Elmar Stellnberger wrote:
Isn`t there any possibility to see if a non-tty recipient understands ANSI-ESC sequences like 'less -R'?
Nope. You can detect "active" recipients via an inquiry control code (which then basically sends back an terminal identification sequence), but not passive ones, like less or the like. Ciao, Michael. -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
participants (4)
-
Duncan Mac-Vicar Prett
-
Elmar Stellnberger
-
Jano Kupec
-
Michael Matz