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

accept-exact and current directory



I use menu completion, and a while ago I found the accept-exact zstyle:

zstyle ':completion:*' accept-exact true

This works very well for me, as I find I often write the whole of a (short)
word, and then on reflex hit <tab> without really intending to do so.
Without the "accept-exact" zstyle, I often change what I wanted to write.

However, I recently discovered a problem with this. Suppose I want to
complete on some hidden file (i.e. beginning with a dot) in my home
directory. I write:

ls ~/.<tab>

Now, since accept-exact is active, zsh assumes that I mean '.' for current
directory, and completes with:

ls ~/./

since '.' is a directory. After that I have to manually remove the trailing
slash, and try to remember the first letter in the file I'm looking for.

Is there some way to specify that I never want '.' to match, as in the path
above and similar cases? I can't see a case where I would ever want to
write "/somepath/./" . Without a way to exclude '.', I guess I'll have to
stop using accept-exact.


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