Is std.process.browse a category mistake?
H. S. Teoh
hsteoh at quickfur.ath.cx
Fri May 27 22:16:15 UTC 2022
On Fri, May 27, 2022 at 07:36:38PM +0000, Adam D Ruppe via Digitalmars-d wrote:
> On Friday, 27 May 2022 at 19:14:33 UTC, kdevel wrote:
> > The same applies to std.process.water_the_flowers.
>
> and it should really be there. On Windows, there's a function to just
> open any file in the user's preferred application. (That's actually
> the one `browse` calls.) It is kinda useful to have.
On (some flavors/configurations of) Linux there's `xdg-open` that does
pretty much the same thing. If installed, that is. Minimal setups may
not include this utility. Nonetheless, it may be a convenient thing to
have, who knows.
... and in fact, xdg-open is what std.process.browse calls, if it
exists. If $BROWSER is set, that gets used in preference over xdg-open.
But if $BROWSER isn't set, xdg-open is used as a fallback.
T
--
MAS = Mana Ada Sistem?
More information about the Digitalmars-d
mailing list