From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14785 invoked by alias); 17 Sep 2015 01:07:22 -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: 36544 Received: (qmail 27227 invoked from network); 17 Sep 2015 01:07:20 -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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.0 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:date:in-reply-to:comments :references:to:subject:mime-version:content-type; bh=dxsFw+8Y2+K4Co/kor69s3rtI0VwN1s5lROrbhdA7QE=; b=b6OZ4yqbBQYBWnRshaotUiVhOiKlgoRP1wDYWM3UAuL6LcQZksg9Kpdot/zqV3eTVa Vaj7BgA19Aoe4XlXTSLz9kWZe210k6olaHIWMVVKvnFayYOaeIaQnPmQOxifTfDn8PLr GF81AzBPH48wToybCqp0c+AJ9Ib1IhcxS6xkV3y1XQCKDVxPutXNjPtQze+0P0qwpc4w OgwTnoOa/2pVDDWiIjUCa/qbahHonZtyBmIa8JBlfIlZGOr31y0wrJ4cfMH3hrYzUHVE Ozgxls6bylFuXQ0KfJ+8kxBR584JZBvzS3J0CIRLUnML0MuXq/xPX8kmNlaynHcDgLaE VmbQ== X-Gm-Message-State: ALoCoQmAFc7cbebU4/VCPi2ffA/ZI9H79jWQtLff/3VFOWCMQZh6hwuFXqISYwPHlb8l2ovCwQhs X-Received: by 10.60.56.167 with SMTP id b7mr27735320oeq.32.1442452038259; Wed, 16 Sep 2015 18:07:18 -0700 (PDT) From: Bart Schaefer Message-Id: <150916180714.ZM9139@torch.brasslantern.com> Date: Wed, 16 Sep 2015 18:07:14 -0700 In-Reply-To: <20150916232123.GA17398@zira.vinc17.org> Comments: In reply to Vincent Lefevre "annoying correction of directory name to non-directory name for cd" (Sep 17, 1:21am) References: <20150916232123.GA17398@zira.vinc17.org> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: Re: annoying correction of directory name to non-directory name for cd MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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. It doesn't know your word is a directory, EXCEPT that, when AUTO_CD and the word is in command position, then it compares it against cdpath if nothing else looks better. alias cd="nocorrect cd" is always an option. We've bandied for years about the possiblity of somehow translating the completion system's syntax knowledge into performing correction, but that all boils down to walking over every word in the command to call the _correct completer on it, which isn't something that belongs in the core shell where CORRECT_ALL sits.