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

Re: Bug#246305: zsh: completion for sudo doesn't add commands under root's path



On Apr 28,  9:04am, Clint Adams wrote:
}
} (PATH="root's:path:for:sudo"; rehash; print $commands)
} 
} or glob for executable files in that path or is there a better solution?

How about:

	local -a +h commands path
	path=( ... )
	compadd -a commands

The more interesting question, I think, would be where to get an accurate
value for root's sudo path without first being root.



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