MCPcopy Create free account
hub / github.com/52funny/pikpakcli / defaultOpenCommand

Function defaultOpenCommand

internal/shell/open.go:251–271  ·  view source on GitHub ↗
(goos string, category string)

Source from the content-addressed store, hash-verified

249}
250
251func defaultOpenCommand(goos string, category string) []string {
252 switch goos {
253 case "darwin":
254 switch category {
255 case openCategoryText:
256 return []string{"open", "-a", "TextEdit"}
257 case openCategoryImage, openCategoryPDF:
258 return []string{"open", "-a", "Preview"}
259 case openCategoryVideo, openCategoryAudio:
260 return []string{"open", "-a", "IINA"}
261 default:
262 return []string{"open"}
263 }
264 case "linux":
265 return []string{"xdg-open"}
266 case "windows":
267 return []string{"cmd", "/c", "start", ""}
268 default:
269 return nil
270 }
271}

Callers 1

buildOpenCommandFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected