Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

file completion of ~user/... stats wrong directory



Hi,

In looking into some completion anomalies, I've noticed that strace
output shows it stat'ing the wrong path when you are completing a path
that starts with ~user/..

If you complete ~user/foo/bar, you see it stat the paths "foo/bar" and
then "foo" relative to the current directory.  This seems broken; even
if those paths exist relative to the current directory, it is
irrelevant to completing under ~user.  It seems to recover in most
cases and generate the right completions despite this, the only
problem this seems to be causing is with our netapp's .snapshot
directories.

Looking at _path_files, I'm guessing it has something to do with
setting prepaths=( '' ) in the logic dealing with ~ prefixed strings.
But I don't understand what prepaths is supposed to be doing.  It
worries me a bit that it is set to that same value in a number of
other cases.  Maybe it should be setting prepaths=() instead?

I'm running out of a nearly up-to-date cvs checkout (_path_files is
up to date at least).

thanks,
Greg



Messages sorted by: Reverse Date, Date, Thread, Author