[GTALUG] odd evince command behaviour

D. Hugh Redelmeier hugh at mimosa.com
Fri Jan 8 13:25:36 EST 2021


| From: D. Hugh Redelmeier via talk <talk at gtalug.org>

| Since, in practice, URLs seem to always contain "/", and filenames do
| not, that would be a better way to distinguish them.

Duh, Hugh.  filenames don't contain / but pathnames do.  It actually takes
a pathname or a URL.

Here are some strategies that I like better.

URLs match protocolname:/ ...
where protocolname is a sequence of letters or digits, as far as I
know.

So: if it looks like a URL, try it as a URL

OR: if protocolname matches a known collection of supported protocols, try 
    it as a URL.

OR: try operand as a pathname; if that fails, try it as a URL.

OR: if it looks like a URL, try it as a URL; if that fails, try it as a 
pathname.


More information about the talk mailing list