From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18088 invoked by alias); 10 May 2007 13:17:38 -0000 Received: (qmail 18078 invoked by uid 22791); 10 May 2007 13:17:37 -0000 X-Spam-Check-By: sourceware.org Received: from return.false.org (HELO return.false.org) (66.207.162.98) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 10 May 2007 13:17:35 +0000 Received: from return.false.org (localhost [127.0.0.1]) by return.false.org (Postfix) with ESMTP id 550994B267; Thu, 10 May 2007 08:17:33 -0500 (CDT) Received: from caradoc.them.org (dsl093-172-095.pit1.dsl.speakeasy.net [66.93.172.95]) by return.false.org (Postfix) with ESMTP id CC5F34B262; Thu, 10 May 2007 08:17:32 -0500 (CDT) Received: from drow by caradoc.them.org with local (Exim 4.67) (envelope-from ) id 1Hm8WS-0002Ld-FW; Thu, 10 May 2007 09:17:32 -0400 Date: Thu, 10 May 2007 13:17:00 -0000 From: Daniel Jacobowitz To: "Maciej W. Rozycki" Cc: gdb-patches@sourceware.org, Chris Dearman , "Maciej W. Rozycki" Subject: Re: Remove a trailing space resulting from file name completion Message-ID: <20070510131732.GA8768@caradoc.them.org> Mail-Followup-To: "Maciej W. Rozycki" , gdb-patches@sourceware.org, Chris Dearman , "Maciej W. Rozycki" References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.15 (2007-04-09) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-05/txt/msg00158.txt.bz2 On Thu, May 10, 2007 at 02:06:32PM +0100, Maciej W. Rozycki wrote: > Hi, > > There is an annoying problem with file name completion when it comes to > internal variables. When a command like: > > (gdb) set logging file log.txt > > is issued ( here denoting a stroke of the named key) and "log.txt" > already exists, then a space is appended (of course it may not make too > much sense to use completion at the very end of the "log.txt" string, but > it may earlier). After issuing the command as is, this space is included > in the variable holding the log file name and consequently, if the log > file is subsequently written, it is created with the trailing space, i.e. > as "log.txt ". The space has to be explicitly deleted if this is not > desired. > > As a file with a trailing space is indeed not desired in about any case, > I propose the following change to be included. OK. I have an Evil Plan for fixing this more thoroughly, which will change the quoting of most "set" commands to be more consistent and friendlier to paths containing spaces and backslashes. But since I still have not gotten to it, I think this is a step in the right direction. -- Daniel Jacobowitz CodeSourcery