From owner-freebsd-current@FreeBSD.ORG Wed Jul 18 14:00:17 2007 Return-Path: X-Original-To: current@freebsd.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8631E16A401 for ; Wed, 18 Jul 2007 14:00:17 +0000 (UTC) (envelope-from gilham@csl.sri.com) Received: from mailgate-internal1.sri.com (mailgate-internal1.SRI.COM [128.18.84.103]) by mx1.freebsd.org (Postfix) with SMTP id 6C90213C4A8 for ; Wed, 18 Jul 2007 14:00:17 +0000 (UTC) (envelope-from gilham@csl.sri.com) Received: from localhost (HELO mailgate-internal1.SRI.COM) (127.0.0.1) by mailgate-internal1.sri.com with SMTP; 18 Jul 2007 13:33:37 -0000 Received: from mx1.csl.sri.com ([130.107.1.29]) by mailgate-internal1.SRI.COM (SMSSMTP 4.1.11.41) with SMTP id M2007071806333613909 for ; Wed, 18 Jul 2007 06:33:36 -0700 Received: from snapdragon.csl.sri.com (snapdragon.csl.sri.com [130.107.19.20]) by mx1.csl.sri.com (8.13.6/8.12.11) with ESMTP id l6IDXa5Z013505 for ; Wed, 18 Jul 2007 06:33:37 -0700 (PDT) (envelope-from gilham@snapdragon.csl.sri.com) To: current@freebsd.org In-reply-to: <469D651C.6080504@fnop.net> References: <469D651C.6080504@fnop.net> Comments: In-reply-to Rui Paulo message dated "Wed, 18 Jul 2007 01:55:56 +0100." X-Mailer: MH-E 8.0.3; nmh 1.2; GNU Emacs 22.0.93 Date: Wed, 18 Jul 2007 06:33:36 -0700 Message-ID: <40882.1184765616@snapdragon.csl.sri.com> From: Fred Gilham Cc: Subject: Re: less -r broken with long lines X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Jul 2007 14:00:17 -0000 Rui Paulo wrote: > Hi, > There's something about how the new less version handles lines greater > than the virtual terminal's size. > > Test case on an xterm/rxvt/screen session: > > less -r /etc/syslog.conf - you won't see the $FreeBSD$ id tag because > of the long line regarding to /var/log/messages. Try resizing your > terminal so that this line fits in the right number of columns. You'll > see the problem disappear. > > less -r /etc/rc.firewall - since there are no long lines in the first > page, you won't notice the problem > > Everything works fine if less is used without the -r argument or if less > is run from the console. > > Does this ring any bell to anyone? > > Regards. > -- > Rui Paulo This is documented behavior. From the "less" manpage: -r or --raw-control-chars Causes "raw" control characters to be displayed. The default is to display control characters using the caret notation; for example, a control-A (octal 001) is displayed as "^A". Warning: when the -r option is used, less cannot keep track of the actual appearance of the screen (since this depends on how the screen responds to each type of control character). Thus, various dis- play problems may result, such as long lines being split in the wrong place. -- Fred Gilham gilham@csl.sri.com The Net interprets Microsoft products as damage, and routes around them.