Skip to content

Commit

Permalink
'p6doc -l' now lists some documents
Browse files Browse the repository at this point in the history
  • Loading branch information
stmuk committed Jan 14, 2016
1 parent a41aee8 commit 47fcaf0
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions bin/p6doc
Expand Up @@ -81,6 +81,9 @@ multi sub MAIN() {
say " $me Str.split";
say " $me faq";

say "\nYou can list some top level documents:";
say " $me -l";

say "\nYou can also look up specific method/routine definitions:";
say " $me -f push";

Expand All @@ -100,6 +103,15 @@ multi sub MAIN($docee, Bool :$n) {
show-docs(locate-module($docee), :no-pager($n));
}

multi sub MAIN(Bool :$l!) {
my @paths = search-paths() X~ <Type/ Language/> ;
for @paths -> $dir {
for dir($dir).sort -> $file {
say Str($file).IO.basename.subst('.pod','') if $file.IO.f;
}
}
}

multi sub MAIN($docee, Bool :$f!, Bool :$n) {
my ($package, $method) = $docee.split('.');
if ! $method {
Expand Down

0 comments on commit 47fcaf0

Please sign in to comment.