This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFA: cd before completing



Daniel Jacobowitz <drow@mvista.com> writes:
> On Tue, Dec 04, 2001 at 12:15:57PM -0500, Jim Blandy wrote:
> > 2001-12-04  Jim Blandy  <jimb@redhat.com>
> > 
> > 	* 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]