MCPcopy
hub / github.com/cli/cli / EditorName

Function EditorName

pkg/surveyext/editor.go:162–170  ·  view source on GitHub ↗
(editorCommand string)

Source from the content-addressed store, hash-verified

160}
161
162func EditorName(editorCommand string) string {
163 if editorCommand == "" {
164 editorCommand = defaultEditor
165 }
166 if args, err := shellquote.Split(editorCommand); err == nil {
167 editorCommand = args[0]
168 }
169 return filepath.Base(editorCommand)
170}

Callers 4

MarkdownEditorMethod · 0.92
promptMethod · 0.85

Calls 1

BaseMethod · 0.80

Tested by

no test coverage detected