Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [PATCH 0/3] completion: make: various improvements



On Thu, Aug 4, 2022 at 4:33 AM Jun T <takimoto-j@xxxxxxxxxxxxxxxxx> wrote:

> > 2022/08/03 23:36, Felipe Contreras <felipe.contreras@xxxxxxxxx> wrote:
> >
> > On Wed, Aug 3, 2022 at 3:54 AM Jun T <takimoto-j@xxxxxxxxxxxxxxxxx> wrote:
> >>
> >> If 'call-command' style is set to false, then these targets are not
> >> offered (as a possible target).
> >
> > But if you set it to true they are.
> >
> > We are talking about the *current code*. The current code already has
> > this behavior.
>
> # I was thinking we were talking about how we can improve the
> # current code.

Code can be improved in any number of ways. One way is to make small
incremental changes that minimize the potential for regressions in
logically independent patches.

Doing all the improvements you can make in one go doesn't minimize the
potential for regressions.

> Without your patch, if call-command is on, 'make <TAB>' at the top level
> of the zsh source tree gives, after a very long wait, huge number of
> possible targets (a few hundreds or more?), but most of them are not
> valid targets.
>
> With your patch it immediately gives about 60 candidates.
> (Most of them are valid, but they still include configure.ac.)
>
> So I thought (probably mistakenly) that part of the objectives of
> the patch was to offer only valid targets. But anyway, I think it is
> better to filter out invalid targets if it is easy to do so.

The objective of the patch is to improve the current situation to the
point where typing 'make <tab>' is actually usable.

Once this has been done in step 1, improving the list of targets can
be done in step 2.

There's no need to try to do two things at the same time, at least not
in the same patch.

> The patch below is basically [1/3]+[2/3], with a few additions:

> (2) Use make option -q instead of -s (as in your awk-version).

For the record, I use -q because that's what bash-completion uses: -npq.

I do not mind any of these changes, but I would have done them on top
of my changes. I would rebase my changes and include yours, but IIRC
you guys squash all the commits anyway.

Either way, I think anything is better than the current situation.

Cheers.

-- 
Felipe Contreras




Messages sorted by: Reverse Date, Date, Thread, Author