aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorTatsuya Kinoshita <tats@debian.org>2020-09-25 12:43:47 +0000
committerTatsuya Kinoshita <tats@debian.org>2020-09-25 12:43:47 +0000
commitea47145ea82155bfe629667fdf4c709256937cac (patch)
tree0c74a30cd5ddf53e0c11e1a4d320dbb3e292a31f /scripts
parentRemove -l flag in CGI script (diff)
downloadw3m-ea47145ea82155bfe629667fdf4c709256937cac.tar.gz
w3m-ea47145ea82155bfe629667fdf4c709256937cac.zip
Assume a local file if the argument contains slash for w3mman
Diffstat (limited to 'scripts')
-rw-r--r--scripts/w3mman/w3mman.in9
1 files changed, 6 insertions, 3 deletions
diff --git a/scripts/w3mman/w3mman.in b/scripts/w3mman/w3mman.in
index fae7a41..5cff68f 100644
--- a/scripts/w3mman/w3mman.in
+++ b/scripts/w3mman/w3mman.in
@@ -22,9 +22,12 @@ while (@ARGV) {
@ARGV || &usage();
if ( $query eq "" ) { $query = "?quit=ok"; }
$query .= "&keyword=" . &form_encode(shift @ARGV);
- } elsif (/^-l$/) {
- @ARGV || &usage();
- $query = "?quit=ok&local=" . &form_encode(shift @ARGV);
+ } elsif (/^-l$/ || /\//) {
+ if (/^-l$/) {
+ @ARGV || &usage();
+ $_ = shift @ARGV;
+ }
+ $query = "?quit=ok&local=" . &form_encode($_);
$query .= "&pwd=" . &form_encode($ENV{'PWD'});
} elsif (/^-/) {
&usage();