From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25081 invoked by alias); 27 Dec 2013 21:16:14 -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: 32189 Received: (qmail 26952 invoked from network); 27 Dec 2013 21:16:07 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:message-id:in-reply-to:references :subject:mime-version:content-type:content-transfer-encoding :content-disposition; bh=HB+mBDHioG9CpNjkFHwV4KlJlN4FO9RsNkSNKpTNZxI=; b=lA3YgbbLTXKhxD00QQOR4cUtV4IGMo0Jsa1lHCtkhQAOQh8xDvGneROeHXrowaxh4E q+qs0+W/NGdaxaOydRhzZIp3jY0L/d7qVJchPDuyX0I6qAsVIulmQHxAtK3N7FZvMbBl qcYFzZyqqaPdbEAKP0dv0NW8fwo0Y7Xx7c4VQHVQAS1C4NqOr9Nwy+Z931CJ05f0QzBI 9mXirxB0pCB2cOd9b9a7A1Wia2OUv5GpSo+DqYvBajrHfDkT6dq4RFXKJ7oo/krsya/Z Hhd/X2tzxuTIJZjSh41/fYWa/DHlyllMjtUJhcSPVb+z4U8lTN9LQ+X6PYk+L5Y8lnAy pceg== X-Gm-Message-State: ALoCoQm5n4k5EGePE5SnhU8PVFbZ8ffDiHpfUlwpIYDNCSkehUmrqMtndhW4SWzYCuYh5i18/sTh X-Received: by 10.180.160.212 with SMTP id xm20mr34713866wib.33.1388178963177; Fri, 27 Dec 2013 13:16:03 -0800 (PST) Date: Fri, 27 Dec 2013 21:15:54 +0000 From: Alexey Bezhan To: zsh-workers@zsh.org Message-ID: <8C206EB3503E4B9FAF437799DFF051CD@fueledbylemons.com> In-Reply-To: <8DAABB32CF84427596279B599BB929DB@fueledbylemons.com> References: <8DAABB32CF84427596279B599BB929DB@fueledbylemons.com> Subject: PATCH _cd: completion fails for "cd .." if $PWD/.. contains a space X-Mailer: sparrow 1.6.4 (build 1178) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi, There=E2=80=99s a bug in =5Fcd completion that results in empty result wh= en trying to complete after =E2=80=9Ccd ../=E2=80=9D if there=E2=80=99s a space somewh= ere in =24PWD/.. Steps to reproduce: =24 mkdir -p =22a b/c=E2=80=9D =24 cd =22a b/c=E2=80=9D =24 cd ../ =23 Results in =60local directory=E2=80=99 and no complet= ion suggestions. The following patch fixes the space issue, but there may be other cases t= hat cause the same behavior that aren=E2=80=99t fixed by this change. diff --git i/Completion/Zsh/Command/=5Fcd w/Completion/Zsh/Command/=5Fcd index a5d328f..abd4fa0 100644 --- i/Completion/Zsh/Command/=5Fcd +++ w/Completion/Zsh/Command/=5Fcd =40=40 -57,7 +57,7 =40=40 else =23 Use cd in a subshell to properly =5Bnot=5D resolve symlinks tmpprefix=3D=24(cd =24=7BPRE=46IX%/*=7D >&/dev/null && print =24PWD) if =5B=5B -n =24tmpprefix =5D=5D; then - tmpWpath=3D(-W =24tmpprefix) + tmpWpath=3D(-W =5C=22=24tmpprefix=5C=22) IPRE=46IX=3D=24=7BIPRE=46IX=7D=24=7BPRE=46IX%/*=7D/ PRE=46IX=3D=24=7BPRE=46IX=23=23*/=7D fi -- Alexey Bezhan