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

Re: How to turn off Mac OS X Network share completion?



On Oct 18,  5:53pm, Gabriel Gilder wrote:
}
} I included this line in my configuration:
} 
} zstyle ':completion:*' users ''
} 
} And now, mercifully, no user directories are used for completion. Whew!

I'm glad that helped, but it doesn't explain why user names were being
completed for "cd" in the first place.

However, the answer has to be that the CDABLE_VARS option is set:

CDABLE_VARS (-T)
     If the argument to a cd command (or an implied cd with the AUTO_CD
     option set) is not a directory, and does not begin with a slash,
     try to expand the expression as if it were preceded by a `~' (see
     *Note Filename Expansion::).

I never use that, so I didn't recognize/recall that it will attempt to
complete user home directory names.

You may want to consider making the context for that zstyle more specific,
e.g.

	zstyle -a :completion::complete:cd::users ''

so that you can still get user names completed in other situations.



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