From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21057 invoked from network); 9 Jul 2006 18:04:17 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00, FORGED_RCVD_HELO autolearn=ham version=3.1.3 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 9 Jul 2006 18:04:17 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 43941 invoked from network); 9 Jul 2006 18:04:09 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 9 Jul 2006 18:04:09 -0000 Received: (qmail 22695 invoked by alias); 9 Jul 2006 18:04:02 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10503 Received: (qmail 22685 invoked from network); 9 Jul 2006 18:04:01 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 9 Jul 2006 18:04:01 -0000 Received: (qmail 42800 invoked from network); 9 Jul 2006 18:04:01 -0000 Received: from nf-out-0910.google.com (64.233.182.187) by a.mx.sunsite.dk with SMTP; 9 Jul 2006 18:03:59 -0000 Received: by nf-out-0910.google.com with SMTP id o63so264299nfa for ; Sun, 09 Jul 2006 11:03:59 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=T07KP4EYVGiX7Ma6qRTu/lZC0LYPwfJ7ifYkYRDotoBw+edzleca3m/INGLHS13HbutXrErVP00W36nbwSo/IbmvVsMfQUtiN28JdJfGv6hX46Md30ncpuXSwktEW6+ftVMoLyj32aFO9QpI84cyvrHtuapQpBwVVKs3MLYIzE0= Received: by 10.78.165.16 with SMTP id n16mr1386797hue; Sun, 09 Jul 2006 11:03:59 -0700 (PDT) Received: by 10.78.178.20 with HTTP; Sun, 9 Jul 2006 11:03:59 -0700 (PDT) Message-ID: Date: Sun, 9 Jul 2006 20:03:59 +0200 From: "Nikolai Weibull" Sender: nikolai.weibull@gmail.com To: "Bart Schaefer" Subject: Re: Is there a way to do an automatic list-choices after successful completion of directory name? Cc: "Zsh Users' List" In-Reply-To: <060709102815.ZM10543@torch.brasslantern.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <060709102815.ZM10543@torch.brasslantern.com> X-Google-Sender-Auth: 272c872a2ed7ff7e On 7/9/06, Bart Schaefer wrote: > On Jul 9, 8:37am, Nikolai Weibull wrote: > } Comments? > That technique only works in combination with this (or a similar) zstyle: > > zstyle :completion::complete:cd:: tag-order \ > local-directories path-directories This fixes that, and also makes it work when completing files: _expand-or-complete-with-list-choices-after-local-directories () { zle expand-or-complete if [[ $_lastcomp[tags] == ' '*(directories|files)' ' && $BUFFER[-1] == '/' ]]; then zle list-choices fi } By the way, why is there a leading and trailing space in $_lastcomp[tags]? nikolai