From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18619 invoked by alias); 10 Feb 2011 16:43:08 -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: 28730 Received: (qmail 12084 invoked from network); 10 Feb 2011 16:43:06 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received-SPF: none (ns1.primenet.com.au: domain at closedmail.com does not designate permitted sender hosts) From: Bart Schaefer Message-id: <110210084252.ZM30454@torch.brasslantern.com> Date: Thu, 10 Feb 2011 08:42:50 -0800 X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: Another _path_files bug? MIME-version: 1.0 Content-type: text/plain; charset=us-ascii I have my zsh build tree separate from my source tree. I also have a ".zsh-test/.zshrc" file that does nothing but load compsys, so that I can easily test completion issues. schaefer[609] ZDOTDIR=$HOME/.zsh-test Src/zsh torch% print $ZSH_VERSION $ZSH_PATCHLEVEL 4.3.11-dev-1 1.5189 torch% ls Test Makefile torch% setopt completeinword The completinword setting is necessary to cause the bug. So now start completion: torch% ls Test/ The "/" is bold (was auto-suffixed), so type a / so that it will remain. Now back up so the cursor is on the "e". and complete again: torch% ls Test//Test/Makefile This only happens when there is only a single completion in the directory. If the completion is ambiguous, it works correctly: torch% touch Test/emptyfile torch% ls Test/ emptyfile Makefile (At this point the cursor has moved to be after the "/".) The first significant difference seems to be at around line 740 - 760 of _path_files where, in the completeinword case, $mid gets assigned on line 749. I think, but am not yet sure, that when $tsuf contains but does not begin with a "/", then at line 754 (and possibly also at line 752, but again not sure) $cpre should NOT have a trailing slash appended. Anyone else care to have a dive at this? --