Documentation ¶
Overview ¶
Package prog provides the entry point to Elvish. Its subpackages correspond to subprograms of Elvish.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var DeprecationLevel = 15
DeprecationLevel is a global flag that controls which deprecations to show. If its value is X, Elvish shows deprecations that should be shown for version 0.X.
Functions ¶
func BadUsage ¶
BadUsage returns an error that may be returned by Program.Main, which requests the main program to print out a message, the usage information and exit with 2.
func Exit ¶
Exit returns an error that may be returned by Program.Main, which requests the main program to exit with the given code. If the exit code is 0, it returns nil.
func Run ¶
Run parses command-line flags and runs the first applicable subprogram. It returns the exit status of the program.
func SetDeprecationLevel ¶ added in v0.15.0
func SetDeprecationLevel(level int) func()
SetDeprecationLevel sets ShowDeprecations to the given value, and returns a function to restore the old value.