mbland / go-script-bash

Framework for writing modular, discoverable, testable Bash scripts
ISC License
96 stars 16 forks source link

Plugin delegate scripts #127

Open mbland opened 7 years ago

mbland commented 7 years ago

There could be a generic mechanism for an application to delegate to a specific plugin, such that it adopts the help text of a plugin script or module automatically.

Basically, a script can be written right now as:

#! /bin/bash
#
# Delegates to plugins/foo/bin/bar

. "$_GO_SCRIPTS_DIR/plugins/foo/bin/bar" "$@"

And we can eventually parse # Delegates to plugins/foo/bin/bar to include that help text instead. Eventually we could even remove the need to include any implementation, possibly making it optional.