Documentation
¶
Overview ¶
Package editor resolves the command that opens a path in the user's editor, shared by the dashboard's "open in editor" links and the `lerd code` command.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Command ¶
Command resolves the argv to open file at line. A configured `editor` template wins (with {file}/{line} substitution, or the file appended when it has neither placeholder); otherwise the first GUI editor found on PATH is used, falling back to the platform opener.
func DirCommand ¶
DirCommand resolves the argv to open a directory, the project-shaped variant of Command. A configured template is reused with {file} as the directory and {line} dropped, since a directory has no line to jump to. There is no platform-opener fallback: xdg-open would hand the directory to the file manager rather than an editor, so nil means "no editor found" and the caller should say so.
Types ¶
This section is empty.