aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/w3mman/w3mman.in
diff options
context:
space:
mode:
authorDai Sato <satodai@w3m.jp>2006-04-07 15:33:56 +0000
committerDai Sato <satodai@w3m.jp>2006-04-07 15:33:56 +0000
commit1014df18200edcd0a0ab72a250c6844fdf3f54b5 (patch)
tree55c2f271eb1aa4669edbf7d7ab5a0856c3d4b97b /scripts/w3mman/w3mman.in
parentrewind to 10 Feb 2006. (diff)
downloadw3m-1014df18200edcd0a0ab72a250c6844fdf3f54b5.tar.gz
w3m-1014df18200edcd0a0ab72a250c6844fdf3f54b5.zip
Add w3mman -l <file> command line argument for viewing of local man files.
Diffstat (limited to 'scripts/w3mman/w3mman.in')
-rw-r--r--scripts/w3mman/w3mman.in5
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/w3mman/w3mman.in b/scripts/w3mman/w3mman.in
index 6c6f65d..6a27e70 100644
--- a/scripts/w3mman/w3mman.in
+++ b/scripts/w3mman/w3mman.in
@@ -8,6 +8,7 @@ sub usage {
($_ = $0) =~ s@.*/@@;
print STDERR "$_ [-M <path>] [[<section>] <command>]\n";
print STDERR "$_ [-M <path>] [-k <keyword>]\n";
+ print STDERR "$_ [-l <file>]\n";
exit 1;
}
@@ -20,6 +21,10 @@ while (@ARGV) {
} elsif (/^-k$/) {
@ARGV || &usage();
$query = "?keyword=" . &form_encode(shift @ARGV);
+ } elsif (/^-l$/) {
+ @ARGV || &usage();
+ $query = "?quit=ok&local=" . &form_encode(shift @ARGV);
+ $query .= "&pwd=" . &form_encode($ENV{'PWD'});
} elsif (/^-/) {
&usage();
} elsif (/^\d/ || $_ eq 'n') {