From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27170 invoked by alias); 4 Mar 2019 17:35:44 -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 27086 invoked by uid 89); 4 Mar 2019 17:35:43 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_PASS autolearn=ham version=3.3.2 spammy=Two, H*MI:sk:2019030 X-HELO: eggs.gnu.org Received: from eggs.gnu.org (HELO eggs.gnu.org) (209.51.188.92) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 04 Mar 2019 17:35:42 +0000 Received: from fencepost.gnu.org ([2001:470:142:3::e]:59813) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h0rV5-0005Sd-28; Mon, 04 Mar 2019 12:35:39 -0500 Received: from [176.228.60.248] (port=2400 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1h0rV4-0003v8-M3; Mon, 04 Mar 2019 12:35:39 -0500 Date: Mon, 04 Mar 2019 17:35:00 -0000 Message-Id: <83k1heee55.fsf@gnu.org> From: Eli Zaretskii To: Jan Vrany CC: gdb-patches@sourceware.org In-reply-to: <20190304145203.11039-3-jan.vrany@fit.cvut.cz> (message from Jan Vrany on Mon, 4 Mar 2019 14:52:03 +0000) Subject: Re: [PATCH v3 2/2] MI: Add new command -complete References: <20190128124101.26243-1-jan.vrany@fit.cvut.cz> <20190304145203.11039-3-jan.vrany@fit.cvut.cz> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-IsSubscribed: yes X-SW-Source: 2019-03/txt/msg00037.txt.bz2 > From: Jan Vrany > Cc: Jan Vrany > Date: Mon, 4 Mar 2019 14:52:03 +0000 > > There is a CLI command 'complete' intended to use with emacs. Such a command > would also be useful for MI frontends, when separate CLI and MI channels cannot > be used. For example, on Windows (because of lack of PTYs) or when GDB is used > through SSH session. > > This commit adds a new '-complete' MI command. Thanks. > diff --git a/gdb/NEWS b/gdb/NEWS > index eaef6aa384..3018313a46 100644 > --- a/gdb/NEWS > +++ b/gdb/NEWS > @@ -96,6 +96,13 @@ maint show dwarf unwinders > info proc files > Display a list of open files for a process. > > +* New MI commands > + > +-complete > + This lists all the possible completions for the rest of the line, if it > + were to be given as a command itself. This is intended for use by MI frontends > + in cases when separate CLI and MI channels cannot be used. This part is OK. > +CLI and MI channels - for example: because of lack of PTYs like on Windows or > +because @sc{gdb} is used remotely via a SSH connection. We use "@value{GDBN}" instead of a literal "gdb" in the manual. > +@item completion > +This field contain a string to be completed on a command line, including ^^^^^^^ "contains" > +@var{command} passed as parameter to @code{-complete} command. If nothing can ^^ Two spaces between sentences, please. > +be completed this field is omitted. ^ Comma missing here. I find this text a bit confusing, so I suggest a slight rewording: This field contains the completed @var{command}. If @var{command} has no known completions, this field is omitted. > +@item matches > +This field contain (possibly empty) array of matches. It is always present. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ "contains a (possibly empty) list of matches" > +@end table What about the max_completions_reached field? I see it here: > +^done,completion="break",matches=["break","break-range"],max_completions_reached="0"