Alois Mahdal
b6598427bb
Apply consistent vertical spacing (inspired by PEP8)
10 years ago
Alois Mahdal
bba8f0a8b8
Describe variables upfront
10 years ago
Alois Mahdal
8ec1d50a93
Use clearer variable names
10 years ago
Alois Mahdal
71bb742278
Remove bogus (dead, forgotten) code
10 years ago
Alois Mahdal
bd4ab8ed17
Change default exit status of usage_is to 2
Similar to grep or test, 1 is reserved for "no", 2 is used for
"incorrect use/syntax"
10 years ago
Alois Mahdal
2bd7a9a3ac
Relax usage_is exitting behavior
Allow usage_is caller specify exit status or suppress exit completely
10 years ago
Alois Mahdal
242a3dd421
Update __echo docstring
10 years ago
Alois Mahdal
a5e8db7273
Do not exit if we are in interactive session
Fastfoo libraries are not intended for interactive sessions (use *fff*),
we are only enabling this to aid development and testing process.
10 years ago
Alois Mahdal
58e3f47d7c
Echo exit status along with command output
10 years ago
Alois Mahdal
9a1f192c9d
Add new core util function: `select_args()`
10 years ago
Alois Mahdal
139fa61084
Make `warn()` skip empty files
10 years ago
Alois Mahdal
1406360348
Fix dead `warn()` (unable to ever print a thing)
10 years ago
Alois Mahdal
080d1b8d10
Use `caller` builtin instead of jumping through hoops
10 years ago
Alois Mahdal
0b8731e0a6
Do not use period in docstring summary
10 years ago
Alois Mahdal
911326a692
Revamp caller identification
This uses even other function __cut_stack to identify two function
names: $caller is the first function on the stack to be be outside
API and is interesting for user so can be used in pretty printer
(typically for debug output). $internal is name of the wrapper
from this API; this is used to choose the right pretty printer
(debug, warn...).
10 years ago
Alois Mahdal
74b38d1309
Rat out name of the disobedient caller
10 years ago
Alois Mahdal
edb55b48fb
Do not imply debug()
10 years ago
Alois Mahdal
1e9d59841e
Emphasize that src does get set in this call
Make it clear that the assignment must happen, otherwise we might easily
end up wit empty src or mixup between local and caller's local.
10 years ago
Alois Mahdal
8e571ce262
Restructure library layout
Things have grown and some parts of layout now make more sense being in different module
10 years ago
Alois Mahdal
1e20d6ddf8
Drop d; this is not a daemon
10 years ago
Alois Mahdal
2f410dff68
Move filter() to core and simplify
10 years ago
Alois Mahdal
96810886a1
Fix caller setting again
10 years ago
Alois Mahdal
bcab87e6ba
Use more appropriate prefix for pipe (namely, a pipe)
10 years ago
Alois Mahdal
3be73bc165
Fix and simplify mechanism to enable mkpretty.
Mkpretty is now always on and defined globally as name of the pretifier,
which is "plain" by default.
"plain" prettifier only adds "debug" and caller name prefix to the debug
output.
10 years ago
Alois Mahdal
721bf63e3d
Fix usage case
usage is supposed to be implemented in user script by call to usage_is
(so that the actual patterns can be defined only once and on the lowest
indent level).
So actually when we see usage_is, we want to skip one FUNCNAME in stack.
(This will not work properly if the suggested usage is not adhered to.)
10 years ago
Alois Mahdal
9551f81efb
Update rest of library to work with new debug -v
10 years ago
Alois Mahdal
4adfc9484f
Completely revamp printing mechanism
Use common backend, add -f and -c, add arbitrary pretty printers support
10 years ago
Alois Mahdal
7a7d39bbca
Fix path traversal
Do not rely on IFS; it does not work with quotes, i.e. spaces in paths.
10 years ago
Alois Mahdal
6672b1eea7
Revamp iniread not to rely on hardcoded paths
iniread will now read either specified files or try to find them in
FFOOD_INIPATH, which is empty by default
10 years ago
Alois Mahdal
c81b21781c
Add -l option to warn() and think()
10 years ago
Alois Mahdal
00fbadba7d
Split long comments
10 years ago
Alois Mahdal
b4826f26a4
Split-fork from qecc
All other files have been moved to *eecc* and whole qecc
history (~300 commits) has been squashed into this commit.
10 years ago