Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Simon Marchi <simon.marchi@polymtl.ca>
To: Pedro Alves <palves@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] Add completer for skip numbers
Date: Sun, 11 Nov 2018 16:52:00 -0000	[thread overview]
Message-ID: <6a37c9a7c3cbf9cc991038df138ee6bc@polymtl.ca> (raw)
In-Reply-To: <59fef7d2-7413-6039-88d9-da883ebaa139@redhat.com>

On 2018-11-10 14:07, Pedro Alves wrote:
> On 11/10/2018 05:39 PM, Simon Marchi wrote:
>> Add completer to various commands that accept skip numbers:
>> 
>>   - skip enable
>>   - skip disable
>>   - skip delete
>>   - info skip
>> 
>> These commands also accept ranges, but I am not too sure of how to do
>> that properly, so I went for the simpler goal of complete just 
>> numbers.
>> 
>> A future idea would be to make a re-usable and well-tested completer 
>> for
>> numbers and ranges.  I think it could at least be re-used for 
>> breakpoint
>> numbers (for example with the "enable breakpoints" command).
> 
> And threads.

Right.


> Please use the lib/completion-support.exp routines
> for testing this.  Those exercise both the complete command
> and actual TAB completion.  Above you want to use
> test_gdb_complete_multiple.
> 
> You should also add:
> 
> - a test that exercises unique completions like "skip delete 12",
>   with test_gdb_complete_unique.
> 
> - a test that exercises no completions at all, like "skip delete 2",
>   with test_gdb_complete_none.
> 
> - some test like "skip delete a1" to make sure we don't
>   mistakenly complete that a1 into a1/a10/a11/a12.
> 
> As for a range completer, doesn't e.g., "skip delete 1-2<tab>" already
> try to complete the "2", and "skip delete 1-" present all the numbers?
> I'd think so, given that '-' is part of the default word break chars
> set (default_word_break_characters).  You should add tests for that 
> too,
> IMO, since people will very naturally use it.  Even if not super smart
> (e.g. 2-[TAB] ideally wouldn't present "1"), it's still useful as is.

Thanks for all the feedback, I hope I have addressed everything in v2.

Simon


      reply	other threads:[~2018-11-11 16:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-10 17:39 Simon Marchi
2018-11-10 19:07 ` Pedro Alves
2018-11-11 16:52   ` Simon Marchi [this message]

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=6a37c9a7c3cbf9cc991038df138ee6bc@polymtl.ca \
    --to=simon.marchi@polymtl.ca \
    --cc=gdb-patches@sourceware.org \
    --cc=palves@redhat.com \
    /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