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

Re: [Pkg-zsh-devel] Bug#679824: zsh: Buggy perl completion with -e [origin: vincent@xxxxxxxxxx]



On Fri, 04 Jul 2014 00:59:13 +0900
"Jun T." <takimoto-j@xxxxxxxxxxxxxxxxx> wrote:
> 2014/06/30 22:02, Jun T. <takimoto-j@xxxxxxxxxxxxxxxxx> wrote:
> >    python -c '...' <TAB>
> >    ruby -e '...' <TAB>
> > 
> > these will complete a command name, not a file name.
> 
> The following is a patch to fix this.
> 
> In the case of ruby, the current _ruby contains
>   '(-)1:script file:_files'
> This means all files (foo.rb, bar.py, junk.c, etc.) are
> offered as Ruby scripts, but I didn't change this in the
> patch. I have no experience with ruby and don't know
> what most ruby users expect here.

.rb is fairly standard but obviously not required; I don't think there's
any good reason for Ruby to be different from other scripting languages
here, though nobody's ever complained.

Probably the best compromise in general would be to have .pl, .py, .rb
and other files completed using separate tags, so you have the easily
configurable option of picking out the native suffix or all files.

I've a vague memory you can already tell _files to do clever things like
that in certain contexts but I'm too lazy to check.

pws



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