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

Re: Perl completion



On May 9,  5:36pm, Paul Johnson wrote:
} 
} >> I've just noticed in _perl that it only completes *.p[ml].
} 
} Which is actually wrong, I think.

It's not precisely wrong, it's just that _perl isn't as clever as it
could be.  It doesn't use the state-machine mechanism for _arguments,
so it doesn't complete differently when -c is [not] among the flags.
It's easier to skip the .pm files when they appear in the completion
listing when they aren't useful, than to know they're available if they
don't appear when you want them.

} It seems to me that it would be better not to pay any heed to the
} extension.

I can't agree with that.  `perl foo<TAB>' should not complete `foo.c' or
`foo.sh' etc.  On the other hand it probably should recognize names with
no extension, such as `foobar'.



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