MCPcopy Index your code
hub / github.com/nikivdev/go / openInCursor

Function openInCursor

cli/flow/main.go:1464–1479  ·  view source on GitHub ↗
(ctx *snap.Context, path string)

Source from the content-addressed store, hash-verified

1462}
1463
1464func openInCursor(ctx *snap.Context, path string) error {
1465 cursorApp := "/Applications/Cursor.app"
1466 if _, err := os.Stat(cursorApp); err != nil {
1467 return fmt.Errorf("Cursor.app not found at %s: %w", cursorApp, err)
1468 }
1469
1470 cmd := exec.Command("open", "-a", cursorApp, path)
1471 cmd.Stdout = ctx.Stdout()
1472 cmd.Stderr = ctx.Stderr()
1473 cmd.Stdin = ctx.Stdin()
1474 if err := cmd.Run(); err != nil {
1475 return fmt.Errorf("open Cursor: %w", err)
1476 }
1477
1478 return nil
1479}
1480
1481func openInZed(ctx *snap.Context, path string) error {
1482 zedApp := "/Applications/Zed.app"

Callers 3

runCloneAndOpenFunction · 0.85
openDocFunction · 0.85
runFocusCursorWindowFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected