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]



2014/06/30 19:58, Jun T. <takimoto-j@xxxxxxxxxxxxxxxxx> wrote:

> I first thought that just replacing the line 19 of _perl
>    '(   -E)*-e+[run one line of program]:one line of program' \
> by
>    '(1   -E)*-e+[run one line of program]:one line of program' \
> would be enough, but it didn't work. For example
> 
>    perl -e 's/foo/bar/' <TAB>
> 
> will offer all the command names (external commands etc.), instead of
> the file names in the current directory.

I have found that _python and _ruby have this problem:

    python -c '...' <TAB>
    ruby -e '...' <TAB>

these will complete a command name, not a file name.
_python has

  '(1 -)-c+[program passed in as string ...]:python command:'
  '*::script argument: _normal'

while _ruby has

  "(1)*-e+[one line of script ...]:one line of script:"
  '*::script argument: _normal'

Maybe we need to fix them after figuring out how to fix _perl.



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