From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: (qmail 26408 invoked from network); 2 May 2020 01:26:54 -0000 Received-SPF: pass (primenet.com.au: domain of zsh.org designates 203.24.36.2 as permitted sender) receiver=inbox.vuxu.org; client-ip=203.24.36.2 envelope-from= Received: from ns1.primenet.com.au (HELO primenet.com.au) (203.24.36.2) by inbox.vuxu.org with ESMTPUTF8; 2 May 2020 01:26:54 -0000 Received: (qmail 1769 invoked by alias); 2 May 2020 01:26:49 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 45758 Received: (qmail 8963 invoked by uid 1010); 2 May 2020 01:26:49 -0000 X-Qmail-Scanner-Diagnostics: from mail-ot1-f41.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.2/25793. spamassassin: 3.4.4. Clear:RC:0(209.85.210.41):SA:0(-1.9/5.0):. Processed in 2.047707 secs); 02 May 2020 01:26:49 -0000 X-Envelope-From: schaefer@brasslantern.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.210.41 as permitted sender) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=dSN9pLvYdhKJf9bthWM3tHn9y5eHgdfU2BOG4qXorSw=; b=ORkD4phuZdSwX1OlhvWyp79tJeKwGw9AQ+DZFSmo8a/la8hj5KYQ8jbO6U5UA+VtfN m7qMHXEi698uPxnT4wZViJcg84P1zcQtKnS4wPZrdVj7mBPKTA19QcJlLAX6445owago tFLjku2fj5/RKbNZSYpeNfZarxNMM80Xz8w4YgqE6fhiPLMg+gnYnGMJRqmz+joAWw7N hGYtvkH2J77ZRgqp0uogk5nAQ6rprASIzeOHzH2Sgnibh3L2mkWT0NNWNvlIut6RwgGL dogu3HjrIb6ZpoWvfaxFt/P/Vb7APgL9B5H7j3dBWRbm4FtFg9pfN6KXWwIIMT22kbbB iAZw== X-Gm-Message-State: AGi0PuaNqy9kTFJU2SxXuZ6iFmM17QbBAbie/DT8uPoy6fH07Y0rKrUG cdboubWTN4wU21lbtNcUXqhrJDlDUrUgDaAF0wr9NkAfvws= X-Google-Smtp-Source: APiQypKrih3hysqM0hWyIOEjzB28YIrjvdXIuC1p2pgAPpDyFmE38b+qlQcBmzSKZ3Eot9b4rkxDzwFlw0a7S0Mg5T8= X-Received: by 2002:a9d:6644:: with SMTP id q4mr6015001otm.229.1588382772691; Fri, 01 May 2020 18:26:12 -0700 (PDT) MIME-Version: 1.0 References: <20200430085111.GA1649750@zira.vinc17.org> <20200430181459.051d3fd1@tarpaulin.shahaf.local2> <20200430201747.GA818727@zira.vinc17.org> <5a4631d6-578e-4362-b0b3-e397f0990ebb@www.fastmail.com> <20200501011116.GE818727@zira.vinc17.org> <20200502004347.5b6d880a@tarpaulin.shahaf.local2> In-Reply-To: <20200502004347.5b6d880a@tarpaulin.shahaf.local2> From: Bart Schaefer Date: Fri, 1 May 2020 18:26:01 -0700 Message-ID: Subject: Re: completion for compilers (cc, gcc...) and -o To: Daniel Shahaf Cc: "zsh-workers@zsh.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, May 1, 2020 at 5:44 PM Daniel Shahaf 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=E2=80=A6 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.