MCPcopy Create free account
hub / github.com/auth0/auth0-cli / getDefaultEditor

Function getDefaultEditor

internal/prompt/editor.go:137–149  ·  view source on GitHub ↗

getDefaultEditor is taken from https://github.com/cli/cli/blob/trunk/pkg/surveyext/editor_manual.go and tries to infer the editor from different heuristics.

()

Source from the content-addressed store, hash-verified

135// getDefaultEditor is taken from https://github.com/cli/cli/blob/trunk/pkg/surveyext/editor_manual.go
136// and tries to infer the editor from different heuristics.
137func getDefaultEditor() string {
138 if g := os.Getenv("GIT_EDITOR"); g != "" {
139 return g
140 } else if v := os.Getenv("VISUAL"); v != "" {
141 return v
142 } else if e := os.Getenv("EDITOR"); e != "" {
143 return e
144 } else if runtime.GOOS == "windows" {
145 return "notepad"
146 }
147
148 return defaultEditor
149}

Callers 2

editor.goFile · 0.85
editorCommandMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected