Support pod document files for perldoc #39

Merged
merged 1 commit into from May 13, 2016

Projects

None yet

2 participants

@plambert
Contributor
plambert commented May 7, 2016

Extend the perl helper to optionally include *.pod files, then include those only for perldoc completions.

For example, this allows the completion of perl -MMoose::M to continue to show only actual perl modules than can be loaded, while allowing the completion of perldoc Moose::M to include the Moose::Manual* documentation.

@scop scop commented on an outdated diff May 8, 2016
completions/perl
@@ -15,6 +15,15 @@ _perlfunctions()
-- "$cur" ) )
}
+_perldocs()
+{
+ printf "%s\t%s\t%s\n" "$(date)" "_perldocs" "$cur" >> /tmp/perl-helper.log
@scop
scop May 8, 2016 Owner

This looks like a security hole: allows appending to arbitrary files to which the completion user has write access through symlinks. But the specifics here don't matter as writing to files is something we don't do in completions in the first place, see CONTRIBUTING.md. So that stuff needs to go.

@plambert
Contributor
plambert commented May 9, 2016

Oh, how embarrassing, that was debugging code I'd left in only on accident. I've removed it.

@plambert
Contributor

It's not clear to me why this build failed; any idea what I'm missing here?

@scop
Owner
scop commented May 12, 2016

Our test suite isn't that stable, looks like the failure has nothing to do with your changes. But could you squash all your changes into one and force-push the result, that way it ends up neater in our change log which is generated from git logs?

@plambert
Contributor

I think I figured out how to squash it. Let's see if the tests pass. Thanks for all your help, and especially for your efforts on bash-completion!

@scop scop merged commit 40e7b4e into scop:master May 13, 2016

1 check failed

continuous-integration/travis-ci/pr The Travis CI build failed
Details
@scop
Owner
scop commented May 13, 2016

No problem, thank you for the contribution; I added a couple of related (non-functional) commits on top of yours. And I also learned that I could have done the squashing in the GitHub UI myself...

@plambert
Contributor

Thanks; I saw your improvements and they look great.

I saw Github added squashing very recently; however, it was worth learning
it anyway, as I am working more and more with other, non-github repos. Git
is a very simple underlying model which leads to some very interesting
structure and workflows that can be built on it. Lots to learn! :)

Thanks again for your help and your work on this project; it’s saving a lot
of people a lot of time!

Paul L.

On Thu, May 12, 2016 at 10:35 PM, Ville Skyttä notifications@github.com
wrote:

No problem, thank you for the contribution; I added a couple of related
(non-functional) commits on top of yours. And I also learned that I could
have done the squashing in the GitHub UI myself...


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#39 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment