Alois Mahdal
884db759da
Add stronger debugging
пре 7 година
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.
пре 7 година
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().
пре 7 година
Alois Mahdal
b18b6da2be
Add "Powered by" advertisement to app --version
пре 7 година
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.
пре 7 година
Alois Mahdal
b989220675
Add --saturnin-get-saturnin-version
пре 7 година
Alois Mahdal
56aa66bf98
Run hook code in separate process
eval was little bit too much.
пре 7 година
Alois Mahdal
f6333b29d8
Use more consistent and readable local variable names
пре 7 година
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.
пре 7 година
Alois Mahdal
cb36dd3d7c
Add variable docstrings where missing
пре 7 година
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
пре 7 година
Alois Mahdal
e617c5b27f
Clarify saturnin__wraphook() docstring
пре 7 година
Alois Mahdal
2f28cdf75d
Reformat docstrings to 76 character width
As recommended by Shellfu style:
https://github.com/AloisMahdal/shellfu/blob/master/notes/style.md
пре 7 година
Alois Mahdal
3b0b91d3b5
Be more informative about saturnin__runhook()
пре 7 година
Alois Mahdal
808357690c
Use new config file finder when loading config file
пре 7 година
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.
пре 7 година
Alois Mahdal
f027235dc3
Add module-version meta-data for future Shellfu generations
пре 7 година
Alois Mahdal
89f01badef
Add saturnin__bug() to help developers help users report bugs
пре 7 година
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.
пре 8 година
Alois Mahdal
66962e9d90
Include SATURNIN_APP_VERSION in debug output
пре 8 година
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.
пре 8 година
Alois Mahdal
5a16d0c943
Enable --help (friendly usage()) in saturnin__conf()
пре 8 година
Alois Mahdal
152c791a99
Add missing docstrings
пре 8 година
Alois Mahdal
2f2d613e9a
Just pass args to mkusage(); no need for --wanted
We're scratching right ear with left hand...
пре 8 година
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).
пре 8 година
Alois Mahdal
0979beb943
Add usage message to saturnin-conf
пре 8 година
Alois Mahdal
a9c5485148
Have saturnin-conf exit with useful statuses
пре 8 година
Alois Mahdal
67bd2e79f6
Hack completion code together to simplify updates
пре 8 година
Alois Mahdal
593fb0348d
Fix usage message not showing short options
пре 8 година
Alois Mahdal
69360a5eae
Clean up main() case tables
пре 8 година
Alois Mahdal
07a9764014
Shorten internal subcommand
Will make code less ugly at places.
пре 8 година
Alois Mahdal
b800648186
Merge usage and help to --help
Be nicer to people who get help by trial and error.
пре 8 година
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.
пре 8 година
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.
пре 8 година
Alois Mahdal
6d787ff043
Remove obsolete `ffrun` sub-command
пре 8 година
Alois Mahdal
4173db5f3c
Add last git hash from application build time
пре 8 година
Alois Mahdal
6b4cfeb11f
Use saturnin__get for --version-semver
пре 8 година
Alois Mahdal
aba45c998d
Add --saturnin-get-* for printing Saturnin internal info
пре 8 година
Alois Mahdal
e1eacaa297
Move main() to the saturnin.sh module
пре 8 година
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.
пре 8 година
Alois Mahdal
594e675521
Move usage() to saturnin.sh module
пре 8 година
Alois Mahdal
66c6c62c54
Add optional codename to version info
пре 8 година
Alois Mahdal
99770e4f06
Move version printing routine to saturnin.sh module
пре 8 година
Alois Mahdal
46c1ab6781
Use more accurate variable name
пре 8 година
Alois Mahdal
f51f9839ce
Add missing docstrings
пре 8 година
Alois Mahdal
ed7847f49b
Use proper naming scheme
пре 8 година
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.
пре 8 година
Alois Mahdal
91a55e625b
Update after renaming of ffoo to shellfu
пре 8 година
Alois Mahdal
8a5dd0f421
Make saturnin subcommand more portable
пре 9 година
Alois Mahdal
6e128ebffd
Apply ShellCheck advice
пре 9 година