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

Re: Problem with dir names containing spaces and parentheses



This is another one where follow-ups probably ought to go to zsh-workers.

On Mar 20,  9:26pm, Jesper Nygards wrote:
} 
} zstyle ':completion:*' path-completion false

This takes the code branch in _path_files that has this comment:

    # Explanation of substitution: For tmp1 and tpre, which are used further
    # on, we need to remove quotes from everything that's not a pattern
    # character, because the code that does the file generation only
    # strips quotes from pattern characters (you know better than
    # to ask why).

A bit later this happens:

	# Now put donepath back the way it should be.  (I think.)
	donepath=${tmp3//(#b)([\\\]\[\^\~\(\)\#\*\?])/\\$match[1]}
	pre=$tpre

This fails to re-quote the space in $donepath and also sets $pre to
the empty string (i.e., $tpre is empty), which breaks any further file
matching in the directory (down around line 427 of _path-files, for
those attempting to follow the bouncing ball).  That's not the only
thing that's going on -- I'm beginning to thing $tmp3 isn't even the
right thing to be assigning to donepath at that point -- but that's
a hint of how tangled up this is.

} I get the same result with this zstyle instead of the previous one (or with
} both together):
} 
} zstyle ':completion:*' accept-exact true

Entirely different reason; here the "compfiles" builtin is failing.  I
am not going to attempt to delve into that.



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