elvish: github.com/elves/elvish/pkg/shell Index | Files

package shell

import "github.com/elves/elvish/pkg/shell"

Package shell is the entry point for the terminal interface of Elvish.

Index

Package Files

editor.go errors_to_json.go interact.go paths.go paths_unix.go runtime.go script.go shell.go signal_unix.go

Variables

var Program prog.Program = program{}

Program is the shell subprogram.

func CleanupRuntime Uses

func CleanupRuntime(stderr io.Writer, ev *eval.Evaler)

CleanupRuntime cleans up the runtime.

func InitRuntime Uses

func InitRuntime(stderr io.Writer, p Paths, spawn bool) *eval.Evaler

InitRuntime initializes the runtime. The caller should call CleanupRuntime when the Evaler is no longer needed.

func Interact Uses

func Interact(fds [3]*os.File, cfg *InteractConfig)

Interact runs an interactive shell session.

func Script Uses

func Script(fds [3]*os.File, args []string, cfg *ScriptConfig) int

Script executes a shell script.

type InteractConfig Uses

type InteractConfig struct {
    SpawnDaemon bool
    Paths       Paths
}

InteractConfig keeps configuration for the interactive mode.

type Paths Uses

type Paths struct {
    RunDir          string
    Sock            string
    DaemonLogPrefix string

    DataDir string
    Db      string
    Rc      string
    LibDir  string

    Bin string
}

Paths keeps all paths required for the Elvish runtime.

func MakePaths Uses

func MakePaths(stderr io.Writer, overrides Paths) Paths

MakePaths makes a populated Paths, using the given overrides.

type ScriptConfig Uses

type ScriptConfig struct {
    SpawnDaemon bool
    Paths       Paths

    Cmd         bool
    CompileOnly bool
    JSON        bool
}

ScriptConfig keeps configuration for the script mode.

Package shell imports 38 packages (graph) and is imported by 3 packages. Updated 2020-09-27. Refresh now. Tools for package owners.