Architecture

Please contribute good (but brief) architecture documentation!

Gist

Execute a command like application [commandgroup] [command].

  • Ex: bent core save calls function core_save() inside Git Bent's core/core.bash file.
  • bent save calls bent 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 inside core/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. Use msg instead
  • NEVER use read -p "msg". Use one of the prompt functions built in.
  • shorthand/aliases are written at the top of a file. See setup/core/core.bash for an example.
  • Use color variables or special msg_ functions to make important stuff stand out, but keep it minimal.