diff options
| author | Mantas Mikulėnas <grawity@gmail.com> | 2022-07-08 23:35:43 +0300 |
|---|---|---|
| committer | Mantas Mikulėnas <grawity@gmail.com> | 2022-07-08 23:35:43 +0300 |
| commit | 7eafc54f886581b85708d4a16c5fe9d28bb2e7be (patch) | |
| tree | 15a508e3ad3ba8a7a557378fb571a0c3db0c5874 | |
| parent | 3d2e0eca5bf7fcb164089e03c1f26294b1385456 (diff) | |
document all supported --style values
| -rwxr-xr-x | treeify | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -208,7 +208,7 @@ sub usage { " -r, --fake-root PATH Prefix with a fake root container", " -R, --reverse Process paths in reverse (for DNS domains)", " -s, --separator SEP Split paths at SEP instead of '/'", - " -y, --style STYLE Change appearance (normal, compact, sideways)", + " -y, --style STYLE Change appearance (pass 'help' for options)", " PATH Only show items under given branch"; } @@ -258,6 +258,17 @@ if ($opt{style} eq "normal") { $opt{sub_indent} = 0; $opt{branch_pad} = 0; $opt{name_pad} = 0; +} elsif ($opt{style} eq "help") { + warn "Supported styles:\n"; + warn " - $_\n" for qw( + normal + compact + vcompact + sideways + sideways-compact + sideways-vcompact + ); + exit(1); } else { die "error: Unknown style '$opt{style}'\n"; } |
