Skip to content

Commit a56714e

Browse files
committed
Prettier usage output.
1 parent 9292957 commit a56714e

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

bin/p6doc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,11 @@ sub show-docs(Str $path, :$section) {
6565
}
6666

6767
multi sub MAIN() {
68+
my $me = $*PROGRAM_NAME.IO.basename;
69+
6870
say 'What documentation do you want to read?';
69-
say "Examples: $*PROGRAM_NAME Type::Str";
70-
say " $*PROGRAM_NAME Type::Str.split";
71+
say "Examples: $me Type::Str";
72+
say " $me Type::Str.split";
7173
}
7274

7375
multi sub MAIN($docee) {

bin/p6doc-index

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,12 @@ sub findbin() returns Str {
1111
constant INDEX = findbin() ~ 'index.data';
1212

1313
multi sub MAIN() {
14-
say "Usage: $*PROGRAM_NAME build to build an index for 'p6doc -f'";
15-
say "Usage: $*PROGRAM_NAME list to list the names";
16-
say "Usage: $*PROGRAM_NAME lookup <key> to display module name containing key";
17-
say "Usage: $*PROGRAM_NAME path-to-index to show where the index file lives";
14+
my $me = $*PROGRAM_NAME.IO.basename;
15+
16+
say "Usage: $me build to build an index for 'p6doc -f'";
17+
say "Usage: $me list to list the names";
18+
say "Usage: $me lookup <key> to display module name containing key";
19+
say "Usage: $me path-to-index to show where the index file lives";
1820
}
1921

2022
multi sub MAIN('path-to-index') {

0 commit comments

Comments
 (0)