zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@zsh.org
Subject: Re: Another _path_files bug?
Date: Sat, 12 Feb 2011 15:03:35 -0800	[thread overview]
Message-ID: <110212150335.ZM2771@torch.brasslantern.com> (raw)
In-Reply-To: <110212142222.ZM2525@torch.brasslantern.com>

On Feb 12,  2:22pm, Bart Schaefer wrote:
}
} } Obvious we'll need to find out if the original problem was more general,
} } in which case splitting off this case may work but isn't the right fix,
} } or if this has repercussions in other simple cases.
} 
} I haven't found any that break, but I don't have, e.g., any files with
} multibyte characters in their names handy to try.

Hmm, not sure if this is related, but (with "|" representing the cursor
position):

schaefer<522> ls ../z/T/M|
schaefer<522> ls ../zsh-|/T/M

I then hit TAB again to get a listing:

schaefer<522> ls ../zsh-|/T/M
Completing files
zsh-3.1.6/        zsh-4.3/          zsh-4.3-build/    zsh-4.3-dynamic/

So far so good.  Now hit TAB a third time to cycle through choices:

schaefer<522> ls ../zsh-3.1.6/T/M|
Completing files
zsh-3.1.6/        zsh-4.3/          zsh-4.3-build/    zsh-4.3-dynamic/

Oops, the cursor has moved all the way to the end of the word.  I think
it should have been positioned right after the 6.  Ah, says I to myself,
I bet ALWAYS_TO_END is involved here.  Let's try again; nope, no diff.

Ah, but if I BOTH unsetopt alwaystoend AND start the completion here:

schaefer<526> ls ../z|/T/M

Then it works:

schaefer<526> ls ../zsh-3.1.6|/T/M
Completing files
zsh-3.1.6/        zsh-4.3/          zsh-4.3-build/    zsh-4.3-dynamic/

This much I can reproduce starting from zsh -f plus compsys.  However,
with my usual matcher-list style added, the above works but the
following breaks:

schaefer<528> ls ../|z/T/M
schaefer<528> ls ../z.|

The style is:

zstyle ':completion:*' matcher-list '' 'r:|[-._,]=** r:|=**' \
  'm:{a-zA-Z}={A-Za-z} r:|[-._,]=** r:|=**' 'r:|[-._,]=** r:|=** l:|=*'

Any clue why that causes the path tail to get discarded?  In the case
with no matcher-list, the compadd at line 493 finds nine possible
matches for (../)(z/), but with the matcher-list it finds none.

The actual files:

../zsh-2.4          ../zsh-3.1.6        ../zsh-4.3-dynamic
../zsh-3.0.5        ../zsh-4.3          ../zsh-forge
../zsh-3.0.8-pre    ../zsh-4.3-build    ../zsh-tarball

(Above are the nine that fail the compadd with the matcher-list.  Below
are the possible completions of the whole path.)

../zsh-3.1.6/Test/Makefile.in     ../zsh-4.3/Test/Makefile.in
../zsh-4.3-build/Test/Makefile    ../zsh-4.3/Test/README
../zsh-4.3-dynamic/Test/Makefile


  reply	other threads:[~2011-02-12 23:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-10 16:42 Bart Schaefer
2011-02-10 17:28 ` Bart Schaefer
2011-02-11 20:39   ` Peter Stephenson
2011-02-12 22:22     ` Bart Schaefer
2011-02-12 23:03       ` Bart Schaefer [this message]
2011-02-13 17:54       ` Peter Stephenson

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=110212150335.ZM2771@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=zsh-workers@zsh.org \
    /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).