example

package module
v0.0.0-...-02ff3d4 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

README

🌳 Go Bonzai™ Composite Command Tree

Trying out the bonzai monolith.

README.md to match your project. Make all your template changes before making your first commit.*

License

Install

This command can be installed as a standalone program or composed into a Bonzai command tree.

Standalone

go install github.com/rwx-yxu/bonzai/cmd/bonzai@latest

Composed

package z

import (
	Z "github.com/rwxrob/bonzai/z"
	example "github.com/rwx-yxu/bonzai"
)

var Cmd = &Z.Cmd{
	Name:     `z`,
	Commands: []*Z.Cmd{help.Cmd, example.Cmd, example.BazCmd},
}

Tab Completion

To activate bash completion just use the complete -C option from your .bashrc or command line. There is no messy sourcing required. All the completion is done by the program itself.

complete -C bonzai bonzai

If you don't have bash or tab completion check use the shortcut commands instead.

Embedded Documentation

All documentation (like manual pages) has been embedded into the source code of the application. See the source or run the program with help to access it.

Other Examples

Documentation

Overview

Package example provides the Bonzai command branch of the same name.

Index

Constants

This section is empty.

Variables

View Source
var Cmd = &Z.Cmd{

	Name:      `bonzai`,
	Summary:   `an example of Bonzai composite command tree`,
	Version:   `v0.4.1`,
	Copyright: `Copyright 2021 Yongle Xu`,
	License:   `Apache-2.0`,
	Site:      `yonglexu.dev`,
	Source:    `git@github.com:rwx-yxu/bonzai.git`,
	Issues:    `github.com/rwx-yxu/bonzai/issues`,

	Commands: []*Z.Cmd{

		help.Cmd, conf.Cmd, vars.Cmd,

		own.Cmd,
	},

	Description: `
		The {{cmd .Name}} command sets all cached variables to their initial
		values. Any variable name from {{cmd "conf"}} will be used to
		initialize if defined.  Otherwise, the following hard-coded package
		globals will be used instead:
			`,
}

Cmd provides a Bonzai branch command that can be composed into Bonzai trees or used as a standalone with light wrapper (see cmd/).

Functions

This section is empty.

Types

This section is empty.

Directories

Path Synopsis
cmd
bonzai-example command

Jump to

Keyboard shortcuts

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