Alois Mahdal
884db759da
Add stronger debugging
vor 7 Jahren
Alois Mahdal
4eb96c584c
Enable adding meta command help text
New variable SATURNIN_META_HELP can be used to control what happens when
user calls the meta command with `--help` argument.
vor 7 Jahren
Alois Mahdal
c8b87ea85f
No need to advertise `conf`
conf is Saturnin's internal command to access common configuration. It
could be, in theory, useful for end-user to investigate the configuration,
but they would already need to know how it works and which configuration
keypaths or sections they want to look at.
Bettter hide it; it's not worth for the potential confusion.
Note that the command could actually even be removed one day since
internally it's much more efficient to use saturnin__conf().
vor 7 Jahren
Alois Mahdal
b18b6da2be
Add "Powered by" advertisement to app --version
vor 7 Jahren
Alois Mahdal
7843f2d0c1
Make saturnin__version() smarter
Only print tagline if defined (similar to codename); do not make it up
with silly string.
Also we can do away without any local variables *and* very safely inside
79 character width recommendation.
vor 7 Jahren
Alois Mahdal
b989220675
Add --saturnin-get-saturnin-version
vor 7 Jahren
Alois Mahdal
56aa66bf98
Run hook code in separate process
eval was little bit too much.
vor 7 Jahren
Alois Mahdal
f6333b29d8
Use more consistent and readable local variable names
vor 7 Jahren
Alois Mahdal
4387831ec8
Show only sub-commands starting with SATURNIN_LIBEXEC_PREFIX
This was always intended; sub-commands starting with dedicated prefix
is the mandatory convention.
vor 7 Jahren
Alois Mahdal
cb36dd3d7c
Add variable docstrings where missing
vor 7 Jahren
Alois Mahdal
dbe8b114f5
Reformat _saturnin__conf_usage() to 79 character width
As recommended by Shaturnin style guide:
https://github.com/AloisMahdal/shellfu/blob/master/notes/style.md
vor 7 Jahren
Alois Mahdal
e617c5b27f
Clarify saturnin__wraphook() docstring
vor 7 Jahren
Alois Mahdal
2f28cdf75d
Reformat docstrings to 76 character width
As recommended by Shellfu style:
https://github.com/AloisMahdal/shellfu/blob/master/notes/style.md
vor 7 Jahren
Alois Mahdal
3b0b91d3b5
Be more informative about saturnin__runhook()
vor 7 Jahren
Alois Mahdal
808357690c
Use new config file finder when loading config file
vor 7 Jahren
Alois Mahdal
00f7e08558
Add generic config file finder
This should be useful for cases when a sub-command wants to maintain
non-INI config locations.
vor 7 Jahren
Alois Mahdal
f027235dc3
Add module-version meta-data for future Shellfu generations
vor 7 Jahren
Alois Mahdal
89f01badef
Add saturnin__bug() to help developers help users report bugs
vor 7 Jahren
Alois Mahdal
74f91edc58
No need to print SATURNIN_LIBEXEC in debug
The related functionality is stable already and the path is easy to find
out using package manager.
vor 8 Jahren
Alois Mahdal
66962e9d90
Include SATURNIN_APP_VERSION in debug output
vor 8 Jahren
Alois Mahdal
c252ad53ed
Convert to pure shellfu library
Move satcmd to other repo and distribute saturnin as a stand-alone
shellfu library. Users can import just the library instead of
embedding it inside their source tree, which enables them to delegate
part of the job to package manager.
vor 8 Jahren
Alois Mahdal
5a16d0c943
Enable --help (friendly usage()) in saturnin__conf()
vor 8 Jahren
Alois Mahdal
152c791a99
Add missing docstrings
vor 8 Jahren
Alois Mahdal
2f2d613e9a
Just pass args to mkusage(); no need for --wanted
We're scratching right ear with left hand...
vor 8 Jahren
Alois Mahdal
615a4b38d2
Fix inigrep query quoting
Absence of quotes breaks queries with spaces. We're already taking care
of files (implicit or given on command line).
vor 8 Jahren
Alois Mahdal
0979beb943
Add usage message to saturnin-conf
vor 8 Jahren
Alois Mahdal
a9c5485148
Have saturnin-conf exit with useful statuses
vor 8 Jahren
Alois Mahdal
67bd2e79f6
Hack completion code together to simplify updates
vor 8 Jahren
Alois Mahdal
593fb0348d
Fix usage message not showing short options
vor 8 Jahren
Alois Mahdal
69360a5eae
Clean up main() case tables
vor 8 Jahren
Alois Mahdal
07a9764014
Shorten internal subcommand
Will make code less ugly at places.
vor 8 Jahren
Alois Mahdal
b800648186
Merge usage and help to --help
Be nicer to people who get help by trial and error.
vor 8 Jahren
Alois Mahdal
bcad50d4f2
Update for Shellfu v0.9.x
The new Shellfu brings some large changes. Among what touches us
directly:
* Most global variables were renamed (removing SHELLFU_* prefix).
* inigrep API has been revamped and the file merging/guessing
feature has been dropped; it now belongs to us.
vor 8 Jahren
Alois Mahdal
84d003e3a1
Remove redundant debug info
subcommand (binary) and its arguments are both already is debug-shown
inside saturnin__runsc; cases when that does not get called are normally
not interesting.
vor 8 Jahren
Alois Mahdal
6d787ff043
Remove obsolete `ffrun` sub-command
vor 8 Jahren
Alois Mahdal
4173db5f3c
Add last git hash from application build time
vor 8 Jahren
Alois Mahdal
6b4cfeb11f
Use saturnin__get for --version-semver
vor 8 Jahren
Alois Mahdal
aba45c998d
Add --saturnin-get-* for printing Saturnin internal info
vor 8 Jahren
Alois Mahdal
e1eacaa297
Move main() to the saturnin.sh module
vor 8 Jahren
Alois Mahdal
b88948ca3d
Avoid exporting SATURNIN_SUBCOMMAND directly
Scripts may need it (eg. if using `saturnin__runhook()`) but exporting
it in the middle of main script makes it harder to see the scope
clearly and also is ugly.
Tweak the saturnin__runsc syntax so that it's not dependent on this
being global and export the SATURNIN_SUBCOMMAND only for the actual
subcommand binary call.
vor 8 Jahren
Alois Mahdal
594e675521
Move usage() to saturnin.sh module
vor 8 Jahren
Alois Mahdal
66c6c62c54
Add optional codename to version info
vor 8 Jahren
Alois Mahdal
99770e4f06
Move version printing routine to saturnin.sh module
vor 8 Jahren
Alois Mahdal
46c1ab6781
Use more accurate variable name
vor 8 Jahren
Alois Mahdal
f51f9839ce
Add missing docstrings
vor 8 Jahren
Alois Mahdal
ed7847f49b
Use proper naming scheme
vor 8 Jahren
Alois Mahdal
2fb1fdbcf3
Rename saturnin_meta module
Since saturnin's dedication to be "meta-command" builder, the distinction
between "meta" and something else does not make much sense.
vor 8 Jahren
Alois Mahdal
91a55e625b
Update after renaming of ffoo to shellfu
vor 8 Jahren
Alois Mahdal
8a5dd0f421
Make saturnin subcommand more portable
vor 9 Jahren
Alois Mahdal
6e128ebffd
Apply ShellCheck advice
vor 9 Jahren