zsh-workers
 help / color / mirror / code / Atom feed
From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: Re: setopt globdots in _path_files
Date: Fri, 5 Nov 1999 10:24:41 +0100 (MET)	[thread overview]
Message-ID: <199911050924.KAA02680@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: "Bart Schaefer"'s message of Fri, 5 Nov 1999 09:00:47 +0000


Bart Schaefer wrote:

> On Nov 4,  8:19pm, Oliver Kiddle wrote:
> } Subject: setopt globdots in _path_files
> }
> } _path_files in bart-8 does a setopt globdots.
> 
> This was the second hunk in Sven's patch of 8479.  It would probably be
> better to back out that hunk, rather than simply remove globdots.

I suggest just using this patch instead of Oliver's.

The problem with just removing the `globdots' is that then even `.../.<TAB>'
doesn't work any more (if globdots is unset by the user).

Bye
 Sven

diff -u oldcompletion/Core/_path_files Completion/Core/_path_files
--- oldcompletion/Core/_path_files	Thu Nov  4 14:50:48 1999
+++ Completion/Core/_path_files	Fri Nov  5 10:20:58 1999
@@ -10,7 +10,7 @@
 
 typeset -U prepaths exppaths
 
-setopt localoptions nullglob rcexpandparam globdots
+setopt localoptions nullglob rcexpandparam
 unsetopt markdirs globsubst shwordsplit nounset
 
 local sopt='-' gopt='' opt
@@ -210,10 +210,15 @@
     # Get the matching files by globbing.
 
     if [[ "$tpre$tsuf" = */* ]]; then
-      tmp1=( ${^tmp1}*(-/) )
+      tmp2=( ${^tmp1}*(-/) )
+      [[ ! -o globdots && "$PREFIX" = .* ]] &&
+          tmp2=( "$tmp1[@]" ${^tmp1}.*(-/) )
     else
-      tmp1=( ${^tmp1}${^~pats} )
+      tmp2=( ${^tmp1}${^~pats} )
+      [[ ! -o globdots && "$PREFIX" = .* ]] &&
+          tmp2=( "$tmp1[@]" ${^tmp1}.${^~pats} )
     fi
+    tmp1=( "$tmp2[@]" )
 
     if [[ -n "$PREFIX$SUFFIX" ]]; then
       # See which of them match what's on the line.

--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


             reply	other threads:[~1999-11-05  9:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-11-05  9:24 Sven Wischnowsky [this message]
  -- strict thread matches above, loose matches on Subject: below --
1999-11-04 20:19 Oliver Kiddle
1999-11-05  9:00 ` Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=199911050924.KAA02680@beta.informatik.hu-berlin.de \
    --to=wischnow@informatik.hu-berlin.de \
    --cc=zsh-workers@sunsite.auc.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).