From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1675 invoked by alias); 4 Dec 2001 22:51:57 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 1654 invoked from network); 4 Dec 2001 22:51:56 -0000 Received: from unknown (HELO zwingli.cygnus.com) (208.245.165.35) by sources.redhat.com with SMTP; 4 Dec 2001 22:51:56 -0000 Received: by zwingli.cygnus.com (Postfix, from userid 442) id 580525E9D8; Tue, 4 Dec 2001 17:52:37 -0500 (EST) To: Daniel Jacobowitz Cc: gdb-patches@sources.redhat.com Subject: Re: RFA: cd before completing References: <20011204171557.2C1E55E9D8@zwingli.cygnus.com> <20011204131539.A10587@nevyn.them.org> From: Jim Blandy Date: Tue, 04 Dec 2001 14:51:00 -0000 In-Reply-To: Daniel Jacobowitz's message of Tue, 4 Dec 2001 13:15:39 -0500 Message-ID: X-Mailer: Gnus v5.3/Emacs 19.34 X-SW-Source: 2001-12/txt/msg00116.txt.bz2 Daniel Jacobowitz writes: > On Tue, Dec 04, 2001 at 12:15:57PM -0500, Jim Blandy wrote: > > 2001-12-04 Jim Blandy > > > > * gdb.base/completion.exp: Rather than completing very long > > filenames, which can make the readline library produce output we > > don't recognize, cd to the directory first, and then complete > > using nice, short relative paths. > > What does it produce that we don't recognize - some kind of line > wrapping? > > (Please include a comment to that effect when this is approved). Is this better? ! # The following tests used to simply try to complete `${objdir}/Make', ! # and so on. The problem is that ${objdir} can be very long; the ! # completed filename may be more than eighty characters wide. When ! # this happens, readline tries to manage things, producing output that ! # may make sense on the screen, but is rather hard for our script to ! # recognize. ! # ! # In the case that motivated this change, the (gdb) prompt occupied ! # the leftmost six columns, and `${objdump}/' was seventy-four ! # characters long --- eighty in all. After printing the slash, ! # readline emitted a space, a carriage return, and then `Makefile' ! # (the tab character being received as input after `Make'. ! # ! # Basically, you have to let readline do whatever it's going to do to ! # make the screen look right. If it happens to use a different ! # strategy on Tuesdays to get the cursor in the right place, that's ! # not something the testsuite should care about. ! # ! # So, we avoid long lines. We `cd' to ${objdir} first, and then do ! # the completion relative to the current directory.