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

RE: Completion of dirs confused over cursor position



> I'm sorry that my diagnosis of this stuff is so poor.  I've avoided the
> new completion stuff, and am having serious head-scratching moments
> trying to figure out how to replicate some old compctl stuff.  Even
> simple things, like:
>  compctl -f -W ~/some/directory commandname
> 

hmm ...

function _foo {
	_files -W /some/directory
}
compadd _foo commandname

does it work?

And doing it automatically:

echo > ~/functions/_foo << EOF
#compadd commandname
_files -W /some/directory
EOF

fpath=($fpath ~/functions)
compinit

the last part obviously goes into .zshrc or whatever. Try running
compinstall as well.

-andrey

> The FAQ still points to compctl usage.  This is not my week.
> 
> (aargh, I can no longer rely upon $_ as being usable. :^( )



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