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

Re: PATCH: Completion for AUTO_CD



On Jun 21, 11:22am, Oliver Kiddle wrote:
} Subject: Re: PATCH: Completion for AUTO_CD
}
} > 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).

I briefly considered that, but then we also ought to rename _vared to
_vared_builtin and rename _in_vared to _vared and so on and so forth,
and I just didn't want to deal with it.

As a lesser consideration, if it's named `_autocd' it's more obvious
that people who don't use autocd could replace it with something else.
 
} 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.

Unfortunately that doesn't cover cdpath, and cdpath is the main reason I
have autocd set in the first place.

} This is there for completing commands by specifying the full path to
} them.

Yes, that's why I asked why _command doesn't call it.

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

Hm.

On Jun 21, 12:30pm, Sven Wischnowsky wrote:
} Subject: Re: PATCH: Completion for AUTO_CD
}
} Oliver Kiddle wrote:
} 
} > It is unfortunate that we now get
} > the directories twice but I can't think of a simple fix.
} 
} I was about to mention the same when this mail came.  The only thing I
} can think of is to make _command_names use only -g, not -/ (it will
} revert to directory completion if there is no executable anyway).  Or
} maybe do that only if autocd is set and _command_names is called from
} _autocd.  Or something.

_autocd could pass an argument to _command_names, along the lines of -e.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   



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