Documentation ¶
Overview ¶
Package program provides the entry point to Elvish. Its subpackages correspond to subprograms of Elvish.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ShowDeprecations = true
Global flag of whether to show deprecations.
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 SetShowDeprecations ¶
func SetShowDeprecations(b bool) func()
SetShowDeprecations sets ShowDeprecations to the given value, and returns a function to restore the old value.