Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: completion for compilers (cc, gcc...) and -o
On Fri, May 1, 2020 at 5:44 PM Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx> 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.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author