From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 43960 invoked by alias); 25 May 2019 21:07:57 -0000 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 Received: (qmail 43952 invoked by uid 89); 25 May 2019 21:07:57 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-10.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.1 spammy=H*f:sk:1556686, H*f:sk:e8cb318, H*f:sk:877ebid, H*f:sk:87imuv3 X-HELO: mailsec117.isp.belgacom.be Received: from mailsec117.isp.belgacom.be (HELO mailsec117.isp.belgacom.be) (195.238.20.113) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 25 May 2019 21:07:54 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=skynet.be; i=@skynet.be; q=dns/txt; s=securemail; t=1558818475; x=1590354475; h=message-id:subject:from:to:cc:date:in-reply-to: references:mime-version:content-transfer-encoding; bh=YXg7i3ChFQTcc0rgOxN+f8zzNacJApl3GPXwzqW6C3c=; b=MMqArdk/4kfsIXONLLUjx3//8Y18yXspSynkmxxa1zMxgZgiv+2EJyfc WLP7XQD+EDqwH2LzbAiC8JuvvEWEBA==; Received: from 161.32-242-81.adsl-dyn.isp.belgacom.be (HELO md) ([81.242.32.161]) by relay.skynet.be with ESMTP/TLS/AES256-GCM-SHA384; 25 May 2019 23:07:53 +0200 Message-ID: <1558818472.1454.30.camel@skynet.be> Subject: Re: "with" command (alternative to the "/" command) From: Philippe Waroquiers To: Pedro Alves , Tom Tromey Cc: gdb-patches@sourceware.org Date: Sat, 25 May 2019 21:07:00 -0000 In-Reply-To: <5220f37a-2bb8-d470-448d-5a640c940ef8@redhat.com> References: <20190421134440.21100-1-philippe.waroquiers@skynet.be> <20190421134440.21100-2-philippe.waroquiers@skynet.be> <877ebidxff.fsf@tromey.com> <1556232239.22002.15.camel@skynet.be> <87imuv34rv.fsf@tromey.com> <1556686410.1511.3.camel@skynet.be> <1556740463.1511.6.camel@skynet.be> <5220f37a-2bb8-d470-448d-5a640c940ef8@redhat.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2019-05/txt/msg00583.txt.bz2 On Fri, 2019-05-24 at 19:31 +0100, Pedro Alves wrote: > I'd like to explore other user interfaces for this. I'm aware > that you've done a ton of work on the / command, which makes > it uncomfortable for me to suggest it... I wish it was > discussed before that; if it was and I missed it, I'm truly > sorry. :-( No problem, the work done on / was not that huge, and at the end, if it was the trigger that led to finish the option work, it was time well spent :). > > In summary: IMO, there is not a huge set of reasons to > > have both the "/" and this patch, or at least there are > > reasonable ways to do what "/" provides, maybe with > > little additional features such as: > > * the optional COMMAND after  > > 'set some_option [COMMAND]' > > * add a systematic way to relaunch the previous command > > by starting a line with a '-' option. > > > > Right, so today I'm kind of sick with fever so I decided to > prototype something, instead of working on what I should be > working on. :-P. > > So I tried quickly prototyping a "with" command, which is > just like "set", but sets the setting, runs the command > and then restores the setting. Looks nice and good enough to replace the / command (and a very often 'with print some_option_often_temporary_changed -- COMMAND' can always be put in a user defined command with a short name). Thanks for doing this, Philippe