From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17867 invoked by alias); 4 Oct 2015 12:23:43 -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: X-Seq: 36769 Received: (qmail 19995 invoked from network); 4 Oct 2015 12:23:41 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_00,TO_NO_BRKTS_PCNT autolearn=no autolearn_force=no version=3.4.0 Date: Sun, 4 Oct 2015 14:17:21 +0200 From: Vincent Lefevre To: zsh-workers@zsh.org Subject: Re: annoying correction of directory name to non-directory name for cd Message-ID: <20151004121721.GA2341@zira.vinc17.org> Mail-Followup-To: zsh-workers@zsh.org References: <20150916232123.GA17398@zira.vinc17.org> <150916180714.ZM9139@torch.brasslantern.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <150916180714.ZM9139@torch.brasslantern.com> X-Mailer-Info: https://www.vinc17.net/mutt/ User-Agent: Mutt/1.5.24-6504-vl-r81226 (2015-09-06) On 2015-09-16 18:07:14 -0700, Bart Schaefer wrote: > On Sep 17, 1:21am, Vincent Lefevre wrote: > } zsh often proposes to correct a directory name to a non-directory > } name. This is annoying. > } > } Or perhaps the correction system should take $cdpath into account. > > CORRECT_ALL isn't intended to be that smart. It doesn't know or care > what the command word is, and doesn't have access to all of the syntax > analysis done by the completion system to understand what each word > position means. For the simplest cases, it doesn't need to know the meaning: when the word is followed by a slash, the filename must be a directory name. So, before proposing anything, the correction system should do such an additional check. At least it would avoid some false positives. -- Vincent Lefèvre - Web: 100% accessible validated (X)HTML - Blog: Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)