Skip to content

Add suitable default open statement for FreeBSD #397

Open
@kMutagene

Description

@kMutagene

Chart.show uses an OS-specific way of opening files:

///Choose process to open plots with depending on OS. Thanks to @zyzhu for hinting at a solution (https://github.com/plotly/Plotly.NET/issues/31)
let openOsSpecificFile path =
if RuntimeInformation.IsOSPlatform(OSPlatform.Windows) then
let psi =
new System.Diagnostics.ProcessStartInfo(FileName = path, UseShellExecute = true)
System.Diagnostics.Process.Start(psi) |> ignore
elif RuntimeInformation.IsOSPlatform(OSPlatform.Linux) then
System.Diagnostics.Process.Start("xdg-open", path) |> ignore
elif RuntimeInformation.IsOSPlatform(OSPlatform.OSX) then
System.Diagnostics.Process.Start("open", path) |> ignore
else
invalidOp "Not supported OS platform"

Since we do not have a match case for FreeBSD, you currently cannot display charts via Chart.show on that OS.

Since i am not familiar with that OS, I would need input from someone that actually uses it on how to proceed here.

My first google attempt comes up with this, but i have no way of testing it.

See also #384

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions