forked from EvergreenCrypto/docker-finance
container: finance: lib_plugins: update usage help
- Clarify usage, add examples, note plugin support type
* finance's `plugins` only supports shell-based plugins
- To use `root` plugins, use `root` command (see `root help`)
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
# docker-finance | modern accounting for the power-user
|
||||
#
|
||||
# Copyright (C) 2024 Aaron Fiore (Founder, Evergreen Crypto LLC)
|
||||
# Copyright (C) 2024-2025 Aaron Fiore (Founder, Evergreen Crypto LLC)
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -65,18 +65,39 @@ function lib_plugins::__parse_args()
|
||||
local -r _usage="
|
||||
\e[32mDescription:\e[0m
|
||||
|
||||
Execute a categorical plugin
|
||||
Execute a categorical shell plugin (non-\`root\`)
|
||||
|
||||
NOTE: for \`root\` plugins, see \`root help\`
|
||||
|
||||
\e[32mUsage:\e[0m
|
||||
|
||||
$ $global_usage <repo${global_arg_delim_1}plugin | custom${global_arg_delim_1}plugin> [args]
|
||||
$ $global_usage [help | [TAB COMPLETION]] [args]
|
||||
|
||||
\e[32mArguments:\e[0m
|
||||
|
||||
[None | help]: show this usage help
|
||||
|
||||
[TAB COMPLETION]: run given shell plugin
|
||||
|
||||
custom = custom plugins in custom plugin location
|
||||
repo = repository plugins in repository location
|
||||
|
||||
[args]: arguments to plugin
|
||||
|
||||
\e[32mExamples:\e[0m
|
||||
|
||||
\e[37;2m# Execute a repository plugin in '${_repo}'\e[0m
|
||||
\e[37;2m# See this usage help\e[0m
|
||||
$ $global_usage help
|
||||
|
||||
\e[37;2m# The output of tab completion\e[0m
|
||||
$ $global_usage \\\t\\\t
|
||||
custom/billing/invoice.bash help repo/timew_to_timeclock.bash
|
||||
custom/billing/manage.bash repo/example.bash
|
||||
|
||||
\e[37;2m# Execute a repository shell plugin in '${_repo}'\e[0m
|
||||
$ $global_usage repo${global_arg_delim_1}example.bash \"I'm in repo\"
|
||||
|
||||
\e[37;2m# Execute a custom plugin in '${_custom}'\e[0m
|
||||
\e[37;2m# Execute a custom shell plugin in '${_custom}'\e[0m
|
||||
$ $global_usage custom${global_arg_delim_1}example.bash \"I'm in custom\"
|
||||
"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user