zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Daniel Shahaf <d.s@daniel.shahaf.name>
Cc: "zsh-workers@zsh.org" <zsh-workers@zsh.org>
Subject: Re: completion for compilers (cc, gcc...) and -o
Date: Fri, 1 May 2020 18:26:01 -0700	[thread overview]
Message-ID: <CAH+w=7acuv2oyD=csJYqjowYtKub-m8Aov6mV9fzKBwNntDsRw@mail.gmail.com> (raw)
In-Reply-To: <20200502004347.5b6d880a@tarpaulin.shahaf.local2>

On Fri, May 1, 2020 at 5:44 PM Daniel Shahaf <d.s@daniel.shahaf.name> wrote:
>
> P.S. I don't understand why it's useful for -o to complete .c files when
> all files in the directory are .c files.  Wouldn't a "No matches" error
> be more practical?  I suppose there's a way to coerce the tag-order style
> into providing these semantics…

Back when Sven was working on compadd et al. and building
_main_complete etc., the theory was that file completion should almost
never fail outright unless the target directory was actually empty.
Hence the default to complete directories if there are no files, to
complete files that "don't make sense" if there are none that fit,
etc.  The feeling was that the users would be more surprised if
nothing happened (because the completion system decided for them what
was "wrong"), than they would be by a "wrong" result.

  reply	other threads:[~2020-05-02  1:26 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-30  8:51 Vincent Lefevre
2020-04-30 17:57 ` Bart Schaefer
2020-04-30 18:14 ` Daniel Shahaf
2020-04-30 20:17   ` Vincent Lefevre
2020-04-30 20:32     ` Bart Schaefer
2020-04-30 20:54       ` Vincent Lefevre
2020-04-30 22:34         ` Daniel Shahaf
2020-04-30 22:36           ` Daniel Shahaf
2020-04-30 23:07             ` Bart Schaefer
2020-04-30 22:05     ` Daniel Shahaf
2020-05-01  1:11       ` Vincent Lefevre
2020-05-02  0:43         ` Daniel Shahaf
2020-05-02  1:26           ` Bart Schaefer [this message]
2020-05-03 23:17           ` Vincent Lefevre
2020-05-04 23:58             ` Daniel Shahaf

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='CAH+w=7acuv2oyD=csJYqjowYtKub-m8Aov6mV9fzKBwNntDsRw@mail.gmail.com' \
    --to=schaefer@brasslantern.com \
    --cc=d.s@daniel.shahaf.name \
    --cc=zsh-workers@zsh.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.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).