2022-03-24 12:32:32 +00:00
|
|
|
# Personal Bonzai Command Tree (Monolith)
|
2022-03-24 09:47:51 +00:00
|
|
|
|
2022-03-24 12:32:32 +00:00
|
|
|
[![GoDoc](https://godoc.org/github.com/rwxrob/cmds?status.svg)](https://godoc.org/github.com/rwxrob/cmds)
|
2022-03-24 09:47:51 +00:00
|
|
|
[![License](https://img.shields.io/badge/license-Apache2-brightgreen.svg)](LICENSE)
|
|
|
|
|
2022-03-24 12:32:32 +00:00
|
|
|
These days I prefer to maintain a single Go monolith command utility
|
|
|
|
with everything I would have used shell scripts for before. I created
|
|
|
|
[Bonzai](https://github.com/rwxrob/bonzai) specifically for this sort of
|
|
|
|
thing. This way I just have to copy a single binary over to whatever
|
|
|
|
system I'm working on and I have all of my favorite functionality on
|
|
|
|
*any* device that Go supports with zero compatibility hassles and
|
|
|
|
installation dependencies. It just works, and by works I mean
|
|
|
|
*anywhere*. Hell, I don't even need a container (but can easily make a
|
|
|
|
FROM SCRATCH container with nothing but `cmds` in it). If I want a
|
|
|
|
subset of the commands I just trim the tree and compose them into a
|
|
|
|
different monolith --- in minutes.
|
2022-03-24 09:47:51 +00:00
|
|
|
|
2022-03-24 12:32:32 +00:00
|
|
|
## Install
|
2022-03-24 09:47:51 +00:00
|
|
|
|
|
|
|
```
|
2022-03-24 12:32:32 +00:00
|
|
|
go install github.com/rwxrob/cmds@latest
|
2022-03-24 09:47:51 +00:00
|
|
|
```
|
|
|
|
|
2022-03-24 12:32:32 +00:00
|
|
|
I have `z` hard link as well to keep things easy to type.
|
2022-03-24 09:47:51 +00:00
|
|
|
|
2022-03-24 12:32:32 +00:00
|
|
|
```
|
|
|
|
ln "$GOBIN/cmds" "$GOBIN/z"
|
2022-03-24 09:47:51 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
## 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.
|
|
|
|
|
|
|
|
```
|
2022-03-24 12:32:32 +00:00
|
|
|
complete -C cmds cmds
|
|
|
|
complete -C z z
|
2022-03-24 09:47:51 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
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.
|