From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8358 invoked by alias); 25 Jun 2010 13:21:55 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 15127 Received: (qmail 16031 invoked from network); 25 Jun 2010 13:21:53 -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=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,T_TO_NO_BRKTS_FREEMAIL autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.google.com designates 74.125.82.43 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=5PfVYOKSCHvS23/b48jauUokyXSMxxTz4p81CXeAyug=; b=guPp2QUEik2eHrmmEoJ8j6qa3XeUUqNPMn3XHN/uRNq/15CsrrCCtHMbsLFUobVpp8 ZdPd2a99bbG66MOEfkOr7ip237tHMSHFFJfyxNiNEyE0122tcDxnnNVJcMFSOb625XbU bYX3lzIVKt11DsnxUALTeAgbl7p9bpPxe2c0A= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=m54nm5I8VDm6xVpqm4wbkx2MEgze8xCbcUKBecqGDAMF10Co0ar1aJl0B2PMCz0bUp 06jRa8zKSCOSyrlPl1PbrIxUBMnSnD8HNa7W8Bf/nSqDdO8YhuS9ASxxtvuxSGS9xin8 lU8rhpmBH+E1BGdidNLHn1FJpBMRKIcKZPIpQ= MIME-Version: 1.0 Date: Fri, 25 Jun 2010 14:27:46 +0200 Message-ID: Subject: Re: Zsh autocompletion with no access to a parent directory From: Yves Frederix To: zsh-users@zsh.org Content-Type: text/plain; charset=ISO-8859-1 Hi all, I have recently switched from bash to zsh and I am loving it. However, there are still issues I didn't experience with bash. One of them is the fact that tabcompletion was not able to cross unreadable parent directories. With the solution proposed in this thread, this now works more or less, but not completely... The problem seems to be related to the use of ~user to access the homedirectory of 'user'. A minimal example: testuser@dirac:~$ ls -ld Desktop/ drwx--x--x 3 testuser testuser 4096 2010-06-25 09:33 Desktop/ testuser@dirac:~$ ls -ld Desktop/work/ drwxr-xr-x 2 testuser testuser 4096 2010-06-25 09:33 Desktop/work/ testuser@dirac:~$ find Desktop/ Desktop/ Desktop/work Desktop/work/file2 Desktop/work/file3 Desktop/work/file4 Desktop/work/file1 If I do (with accept-exact-dirs set to true): yves@dirac ~$ ls ~testuser/Desktop/work/ nothing happens. However, using the full path name: dirac ~$ ls /home/testuser/Desktop/work/ dirac ~$ ls /home/testuser/Desktop/work/file - files - file1 file2 file3 file4 So now it works. What could be going on here, and is there a way to make the form with ~ work as well? Thanks! Cheers, YVES On Tue, 13 Apr 2010 09:33:15 -0700 Matt Wright wrote: > The situation is this: At work we make fairly heavy use of network home > directories. In one particular case some important scripts live in > ~foo/bin, however, the actually home directory of ~foo is not > accessible. This appears to give _path_files a big headache, as trying to > type the following results in no completion suggestions. > > # ~foo/bin/ > > As far as I can tell from my attempts to parse the debugging output, it > is attempting to traverse ~foo for path expansion? I was attempting to look > for a way to disable path expansion (the /u/l/b -> /usr/local/bin stuff) > while leaving normal filename suggestion intact. Either that, or a way to > alter _path_files such that it doesn't die in this situation. You can try telling completion to accept any directory that it knows exists without trying to expand the path: zstyle ':completion:*' accept-exact-dirs true I'm not sure if this will help in the case you're describing, however, since it looks like it might not be able to tell if the directory exists. You'll need zsh 4.3. -- Peter Stephenson Software Engineer Tel: +44 (0)1223 692070 Cambridge Silicon Radio Limited Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, UK Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom