Documentation
¶
Index ¶
Constants ¶
const DefaultIndexDebounce = 500 * time.Millisecond
DefaultIndexDebounce mirrors the watch command's default: a burst of filesystem events (an editor saving, a copy landing in chunks) is collapsed into a single re-index pass.
const ExitCodeIntegrityFailure = 4
ExitCodeIntegrityFailure is the process status `chest verify` asks for when the tree no longer matches its manifest.
The command returns an integrityError rather than calling os.Exit itself, so Execute() can map it the same way it maps thresholdError to 3. Registering it in root.go takes one branch:
if IsIntegrityFailure(err) {
os.Exit(ExitCodeIntegrityFailure)
}
4 is distinct from every other status the CLI uses: 0 success, 1 a command that could not run, 2 unused, 3 a battery threshold that was met. A script checking a backup needs "it ran, and it failed" to be tellable apart from "it ran and found nothing wrong" — that is the whole point of the code.
Variables ¶
var Version = "v0.8.2"
Functions ¶
func IsIntegrityFailure ¶ added in v0.8.0
IsIntegrityFailure reports whether err is the "the tree does not match its manifest" verdict, for callers that want to branch on it rather than on the exit status.
func RenderChestLogo ¶
func RenderChestLogo() string
RenderChestLogo renders the pixel art logo followed by the ANSI prompt marker.
func Update ¶ added in v0.3.0
Update reinstalls CHEST at the latest published version by invoking "go install" on the module's main package. While it runs, a spinner is shown on errOut; "go install"'s own output is captured and replayed once the spinner stops so the two never clobber each other on the same line.
Types ¶
This section is empty.
Source Files
¶
- battery.go
- chart.go
- checkpoint.go
- completion.go
- directio_linux.go
- diskspeed.go
- doctor.go
- history.go
- intel.go
- intel_watch.go
- logo.go
- man.go
- manifest.go
- plan.go
- plugin.go
- plugin_enrich.go
- preset.go
- progress.go
- rename.go
- repl.go
- root.go
- rule.go
- schedule.go
- search.go
- sort.go
- speedtest.go
- speedui.go
- tree.go
- tree_flags.go
- undo.go
- update.go
- version.go
- watch.go