From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 820 invoked from network); 18 Jan 2000 10:01:00 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 18 Jan 2000 10:01:00 -0000 Received: (qmail 23480 invoked by alias); 18 Jan 2000 10:00:37 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9335 Received: (qmail 23473 invoked from network); 18 Jan 2000 10:00:36 -0000 Date: Tue, 18 Jan 2000 10:53:46 +0100 (MET) Message-Id: <200001180953.KAA25795@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk CC: Andy Spiegl Subject: PATCH: special-dirs After several mails from Andy Spiegel I finally realised that (and how) the special-dirs style wasn't tested correctly. Especially with GLOB_DOTS set. This should fix it. Andy: does it work now? Bye Sven diff -ru ../z.old/Completion/Core/_path_files Completion/Core/_path_files --- ../z.old/Completion/Core/_path_files Mon Jan 17 13:54:45 2000 +++ Completion/Core/_path_files Tue Jan 18 09:17:23 2000 @@ -264,27 +264,26 @@ if [[ "$tpre$tsuf" = */* ]]; then tmp2=( ${^tmp1}*(-/) ) - if [[ ! -o globdots && "$PREFIX" = .* ]]; then - tmp2=( "$tmp2[@]" ${^tmp1}.*(-/) ) - if zstyle -s ":completion${curcontext}:paths" special-dirs atmp; then - if [[ "$atmp" = (yes|true|1|on) ]]; then - tmp2=( "$tmp2[@]" . .. ) - elif [[ "$atmp" = .. ]]; then - tmp2=( "$tmp2[@]" .. ) - fi + [[ ! -o globdots && "$PREFIX" = .* ]] && + tmp2=( "$tmp2[@]" ${^tmp1}.*(-/) ) + if [[ -o globdots || "$PREFIX" = .* ]] && + zstyle -s ":completion${curcontext}:paths" special-dirs atmp; then + if [[ "$atmp" = (yes|true|1|on) ]]; then + tmp2=( "$tmp2[@]" . .. ) + elif [[ "$atmp" = .. ]]; then + tmp2=( "$tmp2[@]" .. ) fi fi else tmp2=( ${^tmp1}${^~pats} ) - if [[ ! -o globdots && "$PREFIX" = .* ]]; then - tmp2=( "$tmp2[@]" ${^tmp1}.${^~pats} ) - if [[ "$sopt" = */* ]] && - zstyle -s ":completion${curcontext}:paths" special-dirs atmp; then - if [[ "$atmp" = (yes|true|1|on) ]]; then - tmp2=( "$tmp2[@]" . .. ) - elif [[ "$atmp" = .. ]]; then - tmp2=( "$tmp2[@]" .. ) - fi + [[ ! -o globdots && "$PREFIX" = .* ]] && + tmp2=( "$tmp2[@]" ${^tmp1}.${^~pats} ) + if [[ "$sopt" = *[/f]* && ( -o globdots || "$PREFIX" = .* ) ]] && + zstyle -s ":completion${curcontext}:paths" special-dirs atmp; then + if [[ "$atmp" = (yes|true|1|on) ]]; then + tmp2=( "$tmp2[@]" . .. ) + elif [[ "$atmp" = .. ]]; then + tmp2=( "$tmp2[@]" .. ) fi fi fi -- Sven Wischnowsky wischnow@informatik.hu-berlin.de