frame

package
v0.0.0-...-75e9361 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 19, 2024 License: BSD-3-Clause Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultHistory *history.Container
View Source
var OptionNorc = false

OptionNorc is true, then rcfiles are not executed.

View Source
var SilentMode = false
View Source
var Version string

Version is to show title display.

Functions

func Format2Prompt

func Format2Prompt(format string) string

Format2Prompt converts format-string to output-string

func LoadScripts

func LoadScripts(
	shellEngine func(string) error,
	langEngine func(string) ([]byte, error)) error

LoadScripts loads ".nyagos"

func OptionParse

func OptionParse(_ctx context.Context, sh *shell.Shell, e ScriptEngineForOption) (func(context.Context) error, error)

func Start

func Start(mainHandler func() error) error

func Title

func Title()

Types

type CmdStreamConsole

type CmdStreamConsole struct {
	shell.CmdSeeker
	DoPrompt func(io.Writer) (int, error)
	History  *history.Container
	Editor   *readline.Editor
	HistPath string
}

func NewCmdStreamConsole

func NewCmdStreamConsole(doPrompt func(io.Writer) (int, error)) *CmdStreamConsole

func (*CmdStreamConsole) DisableHistory

func (stream *CmdStreamConsole) DisableHistory(value bool) bool

func (*CmdStreamConsole) ReadLine

func (stream *CmdStreamConsole) ReadLine(ctx context.Context) (context.Context, string, error)

type ScriptEngineForOption

type ScriptEngineForOption interface {
	SetArg([]string)
	RunFile(context.Context, string) ([]byte, error)
	RunString(context.Context, string) error
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL