Files
vibedit/platform_other.go
Sean MTS 396a676146 Initial commit
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 02:28:47 +00:00

39 lines
880 B
Go

//go:build !windows
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 }