From: Yao Qi <yao@codesourcery.com>
To: <gdb-patches@sourceware.org>
Subject: [PATCH] partial fix PR 14777: Add abbrev cmd 'fo' for 'forward-search'.
Date: Wed, 07 Nov 2012 13:01:00 -0000 [thread overview]
Message-ID: <1352293267-6640-1-git-send-email-yao@codesourcery.com> (raw)
Hi,
As reported in gdb/14777, when typing 'fo' in CLI, we will get,
(gdb) fo
Ambiguous command "fo": focus, forward-search.
which is inconsistent to the doc about command 'forward-search' that
"abbreviate the command name as fo".
We can fix this problem in two ways, either remove this line above
from the doc or define "fo" as the abbreviated command of
'forward-search'. IMO, latter is better, so this is what this patch
does.
Regression tested on x86_64-linux. Is it OK?
gdb/doc:
2012-11-07 Yao Qi <yao@codesourcery.com>
* gdb.texinfo (Search): Add kindex for 'fo'.
gdb:
2012-11-07 Yao Qi <yao@codesourcery.com>
PR gdb/14777.
* source.c (_initialize_source): Call add_com_alias to abbreviate
'forward-search' as 'fo'.
---
gdb/doc/gdb.texinfo | 1 +
gdb/source.c | 1 +
2 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index c2c7745..c7777e6 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -6955,6 +6955,7 @@ regular expression.
@table @code
@kindex search
@kindex forward-search
+@kindex fo @r{(@code{forward-search})}
@item forward-search @var{regexp}
@itemx search @var{regexp}
The command @samp{forward-search @var{regexp}} checks each line,
diff --git a/gdb/source.c b/gdb/source.c
index bd11c63..307fecc 100644
--- a/gdb/source.c
+++ b/gdb/source.c
@@ -1953,6 +1953,7 @@ The address is also stored as the value of \"$_\"."));
Search for regular expression (see regex(3)) from last line listed.\n\
The matching line number is also stored as the value of \"$_\"."));
add_com_alias ("search", "forward-search", class_files, 0);
+ add_com_alias ("fo", "forward-search", class_files, 1);
add_com ("reverse-search", class_files, reverse_search_command, _("\
Search backward for regular expression (see regex(3)) from last line listed.\n\
--
1.7.7.6
next reply other threads:[~2012-11-07 13:01 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-07 13:01 Yao Qi [this message]
2012-11-07 15:13 ` Joel Brobecker
2012-11-07 16:07 ` Pedro Alves
2012-11-08 9:39 ` Yao Qi
2012-11-08 16:11 ` Pedro Alves
2012-11-28 10:10 ` Yao Qi
2012-11-28 10:18 ` Pedro Alves
2012-11-28 10:36 ` Yao Qi
2012-11-28 11:10 ` Pedro Alves
2012-11-28 11:57 ` [committed]: " Yao Qi
2012-11-07 16:10 ` Eli Zaretskii
2012-11-09 8:35 ` Yao Qi
2012-11-09 8:43 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1352293267-6640-1-git-send-email-yao@codesourcery.com \
--to=yao@codesourcery.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox