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

Re: annoying correction of directory name to non-directory name for cd



On Oct 4, 10:06am, Bart Schaefer wrote:
}
} -	if (nd <= mindistd) {
} +	if (nd <= mindistd &&
} +	    (!isdir || (stat(unmeta(fn), &st) == 0 && S_ISDIR(st.st_mode)))) {

That doesn't quite do it -- the stat() needs to be on the catenation
of dir and fn.  There's a buffer for this but it might need resizing.
Updated patch later ...



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