MCPcopy Index your code
hub / github.com/codeaashu/claude-code / guiGotoArgv

Function guiGotoArgv

src/utils/editor.ts:58–67  ·  view source on GitHub ↗

* Build goto-line argv for a GUI editor. VS Code family uses -g file:line; * subl uses bare file:line; others don't support goto-line.

(
  guiFamily: string,
  filePath: string,
  line: number | undefined,
)

Source from the content-addressed store, hash-verified

56 * subl uses bare file:line; others don't support goto-line.
57 */
58function guiGotoArgv(
59 guiFamily: string,
60 filePath: string,
61 line: number | undefined,
62): string[] {
63 if (!line) return [filePath]
64 if (VSCODE_FAMILY.has(guiFamily)) return ['-g', `${filePath}:${line}`]
65 if (guiFamily === 'subl') return [`${filePath}:${line}`]
66 return [filePath]
67}
68
69/**
70 * Launch a file in the user's external editor.

Callers 1

openFileInExternalEditorFunction · 0.85

Calls 1

hasMethod · 0.45

Tested by

no test coverage detected