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

Re: PATCH: Completion for AUTO_CD



Bart Schaefer wrote:
> 
> This should be pretty self-explanatory, except for the fact that it's
> named _autocd because _command is pre-empted for the `command' builtin.

I'm not too keen on the name. I'd suggest using _command and renaming
the existing _command, perhaps to _command_builtin (we have an
_jobs_builtin).

My initial thought on seeing your patch was that completion for autocd
already works. This is because of the line in _command_names which adds
executable files and directories. This is there for completing commands
by specifying the full path to them. It is unfortunate that we now get
the directories twice but I can't think of a simple fix.

_cd should also possibly be adding usernames and parameters for the
cdablevars option.

> On a semi-related note, why doesn't _command call `_command_names -e'?

Probably because it pre-dates it.

Oliver



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