zsh-workers
 help / color / mirror / code / Atom feed
* "pws non-canonical hack" problems
@ 2008-08-23  7:24 Alexey I. Froloff
  2008-08-23 14:55 ` Bart Schaefer
  0 siblings, 1 reply; 5+ messages in thread
From: Alexey I. Froloff @ 2008-08-23  7:24 UTC (permalink / raw)
  To: zsh-workers

[-- Attachment #1: Type: text/plain, Size: 1318 bytes --]

I am having problems with "pws non-caninical hack" in
_path_files.  Let me explain with screenshot:

_path_files:
377       # pws non-canonical hack which seems to work so far...
378       # if we didn't match by globbing, check that there is
379       # something to match by explicit name.  This is for
380       # `clever' filing systems where names pop into existence
381       # when referenced.
382       if (( ! $#tmp1 )); then
383           for tmp3 in "$tmp2[@]"; do
384               if [[ -n $tmp3 && $tmp3 != */ ]]; then
385                   tmp3+=/
386               fi
387               if [[ -e "$tmp3${(Q)PREFIX}${(Q)SUFFIX}" ]] then
388                   tmp1+=("$tmp3${(Q)PREFIX}${(Q)SUFFIX}")
389               fi
390           done
391       fi

When I completing directory, sometimes file is being completed.

$ touch foo foobar
$ cd fo<Tab>
Sorry. No match for: `local directory'
$ cd foo<Tab>
$ cd foo (file name is completed)
$ touch foo<Tab>
---- file ----
foo     foobar
$ zstyle ':completion:*' list-dirs-first true
$ touch foo<Tab>
---- directories ----
foo
---- file ----
foo     foobar

I think I can forge more examples where this code will fail.  Can
it be controlled via zstyle, please, so anyone can turn this off?

-- 
Regards,
Sir Raorn.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

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

end of thread, other threads:[~2008-09-01 17:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-08-23  7:24 "pws non-canonical hack" problems Alexey I. Froloff
2008-08-23 14:55 ` Bart Schaefer
2008-08-25 16:47   ` Peter Stephenson
2008-08-26  1:19     ` Bart Schaefer
2008-09-01 17:14       ` Peter Stephenson

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