issue240: If an existing file is passed as parameter, file:// should be used

Priority: feature Status: chatting
msg538 (view) Author: dclemente Date: 2010-01-17.11:44:52
Now, when running:
conkeror file.html
Conkeror will try to open http://file.html/ and fail.
It should detect that file.html exists and open file:///current/directory/file.html instead.

Debian unstable. Latets Conkeror from git. The executable (conkeror) is a symlink to contrib/run-conkeror.
msg539 (view) Author: retroj Date: 2010-01-20.23:52:09
Resolving relative paths automatically like this is a little problematic
because dispatching on the existence of a file, perhaps coincidentally
named with the same name as a website or webjump, is as good as
unpredictable in many circumstances.  Or take the opposite situation,
where you want conkeror to report "Not Found" when the file does not
exist, rather than just fudging it and trying the filename as an url.
(Maybe the caller of the command line is not a human, but another program,
so the user would want to see when there was some error with the filename
they gave, without the possibility of visiting any surprise websites.)
Also the fact that command line arguments are processed identically to the
find-url prompt is intentional and useful in its own right.

Note that absolute paths are unambiguous and currently supported, so you
can do:

  conkeror `pwd`/index.html

An approach that sounds good to me would be to have a command-line switch
that makes conkeror try to resolve arguments as files first, then fall
back to url/webjump/other-url-processors as you suggest.
Date User Action Args
2010-01-20 23:52:09retrojsetstatus: unread -> chatting
messages: + msg539
2010-01-17 11:44:52dclementecreate