shell

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2024 License: BSD-2-Clause Imports: 31 Imported by: 5

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Program

type Program struct {
	ActivateDaemon daemondefs.ActivateFunc
	// contains filtered or unexported fields
}

Program is the shell subprogram. It has two slightly different modes of operation:

  • When the command line argument contains a filename or "-c some-code", the shell is non-interactive. In this mode, it just evaluates the given file or code.

  • Otherwise, the shell is interactive, and launches a terminal REPL. This mode also initializes the storage backend, which in turn activates the storage daemon.

    To enable building a daemon-less version, the subprogram doesn't depend on pkg/daemon, and the caller should supply pkg/daemon.Activate in the ActivateDaemon field to enable functionalities. If it is nil, daemon functionalities are disabled.

func (*Program) RegisterFlags added in v0.18.0

func (p *Program) RegisterFlags(fs *prog.FlagSet)

func (*Program) Run

func (p *Program) Run(fds [3]*os.File, args []string) error

Jump to

Keyboard shortcuts

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