zsh-workers
 help / color / mirror / code / Atom feed
* Re: _path_files and glob qualifiers
@ 2000-05-29  9:54 Sven Wischnowsky
  2000-05-29 10:06 ` Bart Schaefer
  0 siblings, 1 reply; 3+ messages in thread
From: Sven Wischnowsky @ 2000-05-29  9:54 UTC (permalink / raw)
  To: zsh-workers


Bart Schaefer wrote:

> zagzig[20] zstyle -L | grep completer
> zstyle ':completion:*' completer _oldlist _expand _complete _match _ignored _approximate _prefix
> 
> At first I thought the following was a problem with _expand:
> 
> zagzig[21] echo *zshenv(D)
> .zshenv zshenv
> zagzig[22] ls *zshenv(D)<TAB>
> zagzig[23] ls zshenv
> Completing corrections
> zshenv 
> Completing original
> *zshenv(D) 
> 
> Comparing an example that does work against the above via ^X?, I find that
> the real problem is that on line 305, _path_files tests [[ ! -o globdots ]]
> and therefore fails to generate dot-files as possible matches, even though
> the pattern includes the glob-dots qualifier.
> 
> A potential solution is to change [[ "$PREFIX" = .* ]] on lines 305 and 311
> to [[ "$PREFIX" = (.*|*\([^^]#D*\)) ]] or something like that, but I'm not
> entirely sure if that's correct (particularly when there is a suffix).  It
> might instead be necessary to test earlier and setopt localoptions globdots
> if the qualifier is spotted.

Hrm. Think of *(^.^D) and of *(^.,D) etc.

> But then there's the problem of generalizing to other qualifiers ...

Maybe when doing matching, we should copy all qualifiers from the line 
to the patterns used when generating matches (and remove the
qualifiers for matching purposes).

Bye
 Sven


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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: _path_files and glob qualifiers
  2000-05-29  9:54 _path_files and glob qualifiers Sven Wischnowsky
@ 2000-05-29 10:06 ` Bart Schaefer
  0 siblings, 0 replies; 3+ messages in thread
From: Bart Schaefer @ 2000-05-29 10:06 UTC (permalink / raw)
  To: zsh-workers

On May 29, 11:54am, Sven Wischnowsky wrote:
} Subject: Re: _path_files and glob qualifiers
}
} Maybe when doing matching, we should copy all qualifiers from the line 
} to the patterns used when generating matches (and remove the
} qualifiers for matching purposes).

That would probably work.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   


^ permalink raw reply	[flat|nested] 3+ messages in thread

* _path_files and glob qualifiers
@ 2000-05-28 18:14 Bart Schaefer
  0 siblings, 0 replies; 3+ messages in thread
From: Bart Schaefer @ 2000-05-28 18:14 UTC (permalink / raw)
  To: zsh-workers

zagzig[20] zstyle -L | grep completer
zstyle ':completion:*' completer _oldlist _expand _complete _match _ignored _approximate _prefix

At first I thought the following was a problem with _expand:

zagzig[21] echo *zshenv(D)
.zshenv zshenv
zagzig[22] ls *zshenv(D)<TAB>
zagzig[23] ls zshenv
Completing corrections
zshenv 
Completing original
*zshenv(D) 

Comparing an example that does work against the above via ^X?, I find that
the real problem is that on line 305, _path_files tests [[ ! -o globdots ]]
and therefore fails to generate dot-files as possible matches, even though
the pattern includes the glob-dots qualifier.

A potential solution is to change [[ "$PREFIX" = .* ]] on lines 305 and 311
to [[ "$PREFIX" = (.*|*\([^^]#D*\)) ]] or something like that, but I'm not
entirely sure if that's correct (particularly when there is a suffix).  It
might instead be necessary to test earlier and setopt localoptions globdots
if the qualifier is spotted.

But then there's the problem of generalizing to other qualifiers ...

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2000-05-29 10:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-05-29  9:54 _path_files and glob qualifiers Sven Wischnowsky
2000-05-29 10:06 ` Bart Schaefer
  -- strict thread matches above, loose matches on Subject: below --
2000-05-28 18:14 Bart Schaefer

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).