From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9896 invoked by alias); 17 Jun 2009 03:31:24 -0000 Received: (qmail 9888 invoked by uid 22791); 17 Jun 2009 03:31:23 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,SPF_NEUTRAL X-Spam-Check-By: sourceware.org Received: from smtp02.lnh.mail.rcn.net (HELO smtp02.lnh.mail.rcn.net) (207.172.157.102) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 17 Jun 2009 03:31:15 +0000 Received: from mr02.lnh.mail.rcn.net ([207.172.157.22]) by smtp02.lnh.mail.rcn.net with ESMTP; 16 Jun 2009 23:31:13 -0400 Received: from smtp01.lnh.mail.rcn.net (smtp01.lnh.mail.rcn.net [207.172.4.11]) by mr02.lnh.mail.rcn.net (MOS 3.10.5-GA) with ESMTP id PZB39726; Tue, 16 Jun 2009 23:30:23 -0400 (EDT) Received: from 207-172-203-39.c3-0.upd-ubr7.trpr-upd.pa.cable.rcn.com (HELO hydrogen) ([207.172.203.39]) by smtp01.lnh.mail.rcn.net with ESMTP; 16 Jun 2009 23:30:24 -0400 Received: from naesten by hydrogen with local (Exim 4.69) (envelope-from ) id 1MGlqx-0002Ug-DA; Tue, 16 Jun 2009 23:30:23 -0400 From: Samuel Bronson To: gdb-patches@sourceware.org Cc: Samuel Bronson Subject: [PATCH 2/2] * cli/cli-decode.c (apropos_cmd): Skip traversing abbreviations for prefix commands to avoid duplicates in the output. Date: Wed, 17 Jun 2009 03:31:00 -0000 Message-Id: <1245209405-9539-2-git-send-email-naesten@gmail.com> In-Reply-To: <1245209405-9539-1-git-send-email-naesten@gmail.com> References: <1245209405-9539-1-git-send-email-naesten@gmail.com> X-Junkmail-Whitelist: YES (by domain whitelist at mr02.lnh.mail.rcn.net) 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: 2009-06/txt/msg00430.txt.bz2 Signed-off-by: Samuel Bronson --- gdb/cli/cli-decode.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/gdb/cli/cli-decode.c b/gdb/cli/cli-decode.c index e2647fc..73c06bc 100644 --- a/gdb/cli/cli-decode.c +++ b/gdb/cli/cli-decode.c @@ -789,8 +789,11 @@ apropos_cmd (struct ui_file *stream, struct cmd_list_element *commandlist, 0 /* don't recurse */, stream); } } - /* Check if this command has subcommands */ - if (c->prefixlist != NULL) + /* Check if this command has subcommands and is not an abbreviation. + We skip listing subcommands of abbreviations in order to avoid + duplicates in the output. + */ + if (c->prefixlist != NULL && !c->abbrev_flag) { /* Recursively call ourselves on the subcommand list, passing the right prefix in. -- 1.6.3.1