Architecture
Please contribute good (but brief) architecture documentation!
Gist
Execute a command like application [commandgroup] [command]
.
- Ex:
bent core save
callsfunction core_save()
inside Git Bent'score/core.bash
file. -
bent save
callsbent core save
. When not given,core
is the assumed command group
Need To know
-
import core/commandgroup-separate.bash
to include more commands from the same group, but kept in a different file. (used for internal organization when a command group gets unwieldy for a single file) - Functions are written as
function commandgroup_command(){}
and insidecore/commandgroup.bash
-
function commandgroup_command_part2_part3()
is called like:application commandgroup command part2 part3
- I think there's a maximum of 3 parts to the command name
-
- NEVER use
echo
in production code. Usemsg
instead - NEVER use
read -p "msg"
. Use one of theprompt
functions built in. - shorthand/aliases are written at the top of a file. See @see_file(setup/core/core.bash) for an example.
- Use color variables or special
msg_
functions to make important stuff stand out, but keep it minimal.- See @see_file(code/lib/color-vars.bash) for color vairables.
- @see_file(code/lib/msg.bash) for examples