MCPcopy Create free account
hub / github.com/cli/cli / init

Function init

pkg/surveyext/editor.go:22–32  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

20)
21
22func init() {
23 if g := os.Getenv("GIT_EDITOR"); g != "" {
24 defaultEditor = g
25 } else if v := os.Getenv("VISUAL"); v != "" {
26 defaultEditor = v
27 } else if e := os.Getenv("EDITOR"); e != "" {
28 defaultEditor = e
29 } else if runtime.GOOS == "windows" {
30 defaultEditor = "notepad"
31 }
32}
33
34// EXTENDED to enable different prompting behavior
35type GhEditor struct {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected