Files
vibedit/platform_other.go
2026-10-17 06:21:19 +00:00

39 lines
890 B
Go

//go:build !windows && !linux
package main
import (
"errors"
"os/exec"
"path/filepath"
"runtime"
)
const nativeDialogs = false
func hideConsole(cmd *exec.Cmd) {}
func listRoots() []string { return []string{"/"} }
func openBrowser(url string, preferDefault bool) error {
if runtime.GOOS == "darwin" {
return exec.Command("open", url).Start()
}
return exec.Command("xdg-open", url).Start()
}
func revealInFileManager(path string) error {
if runtime.GOOS == "darwin" {
return exec.Command("open", "-R", path).Start()
}
return exec.Command("xdg-open", filepath.Dir(path)).Start()
}
func waitBeforeExit() {}
var errNoDialogs = errors.New("native file dialogs are not supported on this platform")
func nativeOpenDialog(title, dir string) ([]string, error) { return nil, errNoDialogs }
func nativeSaveDialog(title, path string) (string, error) { return "", errNoDialogs }