From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17900 invoked by alias); 4 Oct 2015 18:29:39 -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: 36772 Received: (qmail 24688 invoked from network); 4 Oct 2015 18:29:38 -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=FLoNDscENIVqMk4ORSj5FFz40sCINRHzOR8ai+GF6Zo=; b=Y9YtRA4kusFNWCOZT8Id3rrYogreg+iN5IwOg0VJSGlzMnn+42qkO9B69lJEf2VWrO vnGhSvRnPUB82QPEUbvW84nhhXVE0NSPzMfbKUGdEXUjg3RVz5q6O+zncrqblQ5ByIST fWaH6C5MNZsVix+o/PLgfs9uDJ9j953IegauIuP2q1lsoj9AcwXoSVex7hYXewFDHwNb a4YMNdd9HXR1cBXQOa3PzNgoo3kgpuKJVQ8vIXFfW8EE9RnldS5b7U5BfyGKWd+PSvpv HOr4CigjdjTiLKVcpzGSPR03iJFeCW/vpZrRkKdrIO+Q9072pABtDQhAYsMh3KQ2Cy+P kAmA== X-Gm-Message-State: ALoCoQnXNY3G0CUJIfO0afhh7l4cgKJP7Trj+9ZMiXSx4zlUtPLVNA5zcmQld5GQ+8Q/yakUuRRn X-Received: by 10.202.214.133 with SMTP id n127mr14392467oig.52.1443983373728; Sun, 04 Oct 2015 11:29:33 -0700 (PDT) From: Bart Schaefer Message-Id: <151004112931.ZM3752@torch.brasslantern.com> Date: Sun, 4 Oct 2015 11:29:31 -0700 In-Reply-To: <151004100604.ZM3726@torch.brasslantern.com> Comments: In reply to Bart Schaefer "Re: annoying correction of directory name to non-directory name for cd" (Oct 4, 10:06am) References: <20150916232123.GA17398@zira.vinc17.org> <150916180714.ZM9139@torch.brasslantern.com> <20151004121721.GA2341@zira.vinc17.org> <151004100604.ZM3726@torch.brasslantern.com> 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 Oct 4, 10:06am, Bart Schaefer wrote: } } - if (nd <= mindistd) { } + if (nd <= mindistd && } + (!isdir || (stat(unmeta(fn), &st) == 0 && S_ISDIR(st.st_mode)))) { That doesn't quite do it -- the stat() needs to be on the catenation of dir and fn. There's a buffer for this but it might need resizing. Updated patch later ...