From ea47145ea82155bfe629667fdf4c709256937cac Mon Sep 17 00:00:00 2001 From: Tatsuya Kinoshita Date: Fri, 25 Sep 2020 21:43:47 +0900 Subject: Assume a local file if the argument contains slash for w3mman --- scripts/w3mman/w3mman.in | 9 ++++++--- 1 file 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(); -- cgit v1.2.3