fix: lib/sh/util.sh: echo_vars(): also need to print unset vars (including unset kw_params)
lib/sh/util.sh: echo_vars(): put loop var on same line as `for`
bugfix: lib/sh/util.sh: sudo(): need to preserve PATH separately because -E does not preserve this
lib/sh/util.sh: echo_redirs_cmd(): inline the function alias since it's only used in one place
bugfix: lib/sh/util.sh: redir(): need to load new aliases before it
lib/sh/util.sh: echo_redirs_cmd(): log $PATH to facilitate troubleshooting
lib/sh/util.sh: echo_redirs_cmd(): documented what the $(...) section does
lib/sh/util.sh: echo_redirs_cmd(): moved comment about <>file redirs to line that it applies to
lib/sh/util.sh: moved echo_redirs_cmd() to right before redir() which uses it
lib/sh/util.sh: catch(): log at higher log_level, since this is internal code
fix: lib/sh/util.sh: die_e(): treat SIGPIPE as benign error
lib/sh/util.sh: removed no longer used ignore_sig(). use ignore() instead, which now supports SIG*.
lib/sh/util.sh: piped_cmd(): use ignore, which now supports SIG*
lib/sh/util.sh: signals: catch(): added echo_func
lib/sh/util.sh: set_global_fds(): debug to global stderr in case stderr filtered
lib/sh/util.sh: debugging: use configurable debug_fd (set to $err_fd)
lib/sh/util.sh: signals: override catch() to support SIG* as exception type
lib/sh/util.sh: moved primitives sections before more complex sections that depend on them
lib/sh/util.sh: 2nd functions section: moved to 1st functions section
bugfix: lib/sh/util.sh: added workaround for bash bug where exit sometimes inxeplicably ignores $?
fix: lib/sh/util.sh: self_builtin: avoid $() so that $? isn't modified
lib/sh/util.sh: use new self_builtin
lib/sh/util.sh: added self_builtin
lib/sh/util.sh: pv(), pf(): moved to debugging section
bugfix: lib/sh/util.sh: stderr_matches(): also need to handle any filter error, such as caused by Ctrl+C
lib/sh/util.sh: stderr_matches(): echo_vars @PIPESTATUS_ to assist debugging
bugfix: lib/sh/util.sh: stderr2stdout(): use piped_cmd to ignore SIGPIPE since the output of this will piped to another command
lib/sh/util.sh: setup_log_fd(): $log_fd: use 3 (stdlog) since other scripts are likely to use this for logging as well
fix: lib/sh/util.sh: setup_log_fd(): fd_set_default(): use $log_fd instead of repeating the value of it
lib/sh/util.sh: die(): log at higher log_level, since this is logging code
lib/sh/util.sh: highlight_log_msg(): log at higher log_level, since this is logging code
bugfix: lib/runscripts/util.run: $subdirs: adjusted log_level now that echo_vars is one log_level lower
bugfix: lib/sh/util.sh: stderr_matches(): only set benign_error=1 if the matched error occurred
lib/sh/util.sh: ignore_e(): also set benign_error=1
fix: lib/sh/util.sh: prep_try alias: removed inaccurate comment
bugfix: lib/sh/util.sh: stdout2fd(): moved after redir() which it depends on
fix: lib/sh/util.sh: command(): moved `|| die_e` to command__exec so it would be properly indented under the echoed command
lib/sh/util.sh: verbosity_compat(): log at higher log_level because it's logging code
lib/sh/util.sh: $benign_error: log at higher log_level because it's logging code
lib/runscripts/util.run: $wrap_fn: log at higher log_level because it's startup code
lib/sh/util.sh: $top_* vars, $is_outermost: log at higher log_level because it's startup code
lib/sh/util.sh: $top_script: echo_vars this like the other $top_* vars
lib/sh/util.sh: .(): log at higher log_level because it's startup code
lib/sh/util.sh: is_dot_script(): run with higher log_level since this is run at the beginning of the script
lib/sh/util.sh, runscripts/util.run: set_paths(): run with higher log_level to hide all the paths that are set at the beginning of the script
lib/sh/util.sh: added log++ stub
lib/sh/util.sh: added log_local stub
lib/sh/util.sh: added log() stub so internal commands can use it
fix: lib/sh/util.sh: echo_vars(): log at same log_level as echo_func so kw_params are displayed along with positional params
fix: lib/sh/util.sh: rel_path(): log this internal command at a higher log_level so it's normally hidden
fix: lib/sh/util.sh: log_msg!(): log split_lines at a higher log_level so it's normally hidden
bugfix: lib/sh/util.sh: stderr_matches(): `log_local; log++` should apply to just stdout_contains() and part of stderr2stdout() rather than all of stderr_matches()
lib/sh/util.sh: stderr_matches(): run at higher log_level because error-handling internals should not be logged by default
bugfix: lib/sh/db.sh: mysql_ctl(): need to ignore errors if not running
bugfix: lib/sh/util.sh: stderr_matches(): handle any error: only ignore_e if the error exit status was associated with the matched error message
bugfix: lib/sh/util.sh: stderr_matches(): handle any error: need force-exit with rethrow_exit() because caller's test of return status disables errexit
lib/sh/util.sh: added rethrow_exit(), which exits even where errexit is disabled
bugfix: lib/sh/db.sh: mysql_snapshot(): need to run `mysql_ctl start` even if there is an error
lib/sh/db.sh: mysql_snapshot(): $to: default to $from.bak
lib/sh/db.sh: added mysql_snapshot()
lib/sh/db.sh: added mysql_ctl()
lib/sh/db.sh: pg_cmd(): updated to use new sudo()
lib/runscripts/util.run: added sudo() override that uses $wrap_fn to support shell functions
fix: lib/runscripts/util.run: $wrap_fn: make it usable even if $top_script isn't world-executable
lib/sh/util.sh: sudo alias: use function instead so this can be overridden
lib/sh/util.sh: added is_intern()
lib/sh/util.sh: is_callable(): use just $1 because multiple args are not applicable
lib/sh/util.sh: added is_world_executable()
lib/sh/util.sh: added has_perms()
lib/sh/util.sh: esc_args(): renamed to just esc() because this can also be used on a single value
lib/sh/util.sh: added is_extern()
lib/sh/util.sh: added sudo alias to alias-expand command
lib/sh/db.sh: pg_cmd(): $as_root: use $sudo
lib/sh/util.sh: added $sudo
lib/sh/util.sh: added cp alias
lib/sh/db.sh: removed no longer used pg_as_root(), which was buggy anyway. use `as_root=1 ...` instead.
lib/sh/db.sh: mysql_ANSI: fixed comment
lib/sh/db.sh: pg_dump(): support dumping entire cluster, and cluster users
lib/sh/db.sh: pg_cmd(): added $as_root switch
lib/sh/db.sh pg_dump(), bin/pg_dump_vegbien: --format=plain: removed comment that this is the plain format, because this is now self-documenting
lib/sh/db.sh pg_dump(), bin/pg_dump_vegbien: --format: use the long form of the formats to make the code self-documenting
fix: lib/PostgreSQL-MySQL.csv: preserve schema assignments by translating `SET search_path` to `USE`
bugfix: lib/runscripts/import.run: all(): also need to propagate $rm to import()
bugfix: lib/sh/util.sh: local_array/export_array: do need -a because that it's an array is apparently not autodetected by the () on Mac
lib/sql_gen.py: map_expr(): documented that unlike bin/repl SQL identifier handling, this does simplify the resulting expression
lib/sql_gen.py: map_expr(): documented that this is a special case of bin/repl SQL identifier handling which does not handle entire source files
bin/repl, lib/sql_gen.py Expression transforming: documented that this can also be done in Postgres with expression substitution (wiki.vegpath.org/Postgres_queries#expression-substitution)
bugfix: lib/runscripts/table.run: table_make_install(): need to ignore skip_table() errexit
lib/sh/util.sh: import_vars: documented that vars already set will not be overwritten
fix: lib/common.Makefile: $(nice): use an increment of +10 instead of +5 because +5 still leaves the shell sluggish
lib/common.Makefile: added $(nice) and use it everywhere its definition is used
fix: lib/sql_io.py: put_table(): don't warn if can't create pkey, because this just indicates that a set-returning function was used. this should get rid of the last of the confusing benign warnings in the test output.
fix: lib/sql.py: flatten(): don't warn if can't create pkey, because this just indicates that a set-returning function was used
lib/sql.py: run_query_into() added add_pkey_warn param to support turning off "could not create unique index" warnings, which are sometimes benign (eg. when using set-returning functions with column-based import)
lib/sh/util.sh: removed end_try_subshell, which now does the same thing as end_try
fix: lib/sh/archives.sh: unzip(): support -p option, which pipes extracted data to stdout
added lib/runscripts/extract_header.run
fix: lib/sh/make.sh: direct the user to use begin_target instead of set_make_vars (set_make_vars is now used by begin_target)
fix: lib/runscripts/util.run: to_top_file(): handle $_remake properly, without requiring deferred_check_target_exists to set to_file()'s flags
bugfix: lib/sh/util.sh: die(): usage: documented that if msg uses $(...), save_e is needed