MCPcopy Create free account
hub / github.com/Effect-TS/tsgo / EnterCommandLineMode

Function EnterCommandLineMode

etscore/climode.go:12–17  ·  view source on GitHub ↗

EnterCommandLineMode sets the CLI mode flag to true and returns a restore function that reverts it to its previous value. Intended for use with defer: restore := etscore.EnterCommandLineMode() defer restore()

()

Source from the content-addressed store, hash-verified

10// restore := etscore.EnterCommandLineMode()
11// defer restore()
12func EnterCommandLineMode() func() {
13 prev := commandLineMode.Swap(true)
14 return func() {
15 commandLineMode.Store(prev)
16 }
17}
18
19// IsCommandLineMode reports whether the process is currently running in CLI
20// (tsc) mode, as opposed to LSP or other flows.

Calls

no outgoing calls