From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 336 invoked by alias); 7 Apr 2008 19:28:50 -0000 Received: (qmail 325 invoked by uid 22791); 7 Apr 2008 19:28:50 -0000 X-Spam-Check-By: sourceware.org Received: from mtaout1.012.net.il (HELO mtaout1.012.net.il) (84.95.2.1) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 07 Apr 2008 19:28:24 +0000 Received: from HOME-C4E4A596F7 ([80.230.253.114]) by i-mtaout1.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0JYZ00CKA02HE040@i-mtaout1.012.net.il> for gdb@sources.redhat.com; Mon, 07 Apr 2008 22:42:18 +0300 (IDT) Date: Mon, 07 Apr 2008 19:37:00 -0000 From: Eli Zaretskii Subject: Re: Strangeness in set command In-reply-to: <1207595159.31772.330.camel@localhost.localdomain> X-012-Sender: halo1@inter.net.il To: Michael Snyder Cc: drow@false.org, schwab@suse.de, gdb@sources.redhat.com Reply-to: Eli Zaretskii Message-id: Content-transfer-encoding: 7BIT References: <20080405185423.GB13805@caradoc.them.org> <1207595159.31772.330.camel@localhost.localdomain> X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2008-04/txt/msg00064.txt.bz2 > From: Michael Snyder > Cc: Eli Zaretskii , Andreas Schwab , gdb@sources.redhat.com > Date: Mon, 07 Apr 2008 12:05:59 -0700 > > The problem is that "so long as it is not ambiguous" > is dicy, and changes over time as we add new subcommands > to "set". > > The shortcut is probably one of those "seemed like a > good idea at the time" things, but now it's established > and we're stuck with it. > > It would probably be a good idea if, every time we parse > a "set" command, we try to match it with BOTH a variable > AND a subcommand, and if there is ambiguity we say so > explicitly. Or maybe, if the text after "set " has a `=' character in it, we should ask whether the user really meant "set variable". IOW, refuse to obey this shortcut, even if it's unambiguous.