run()
Encapsulates the running of commands in a way that allows them to be logged, simulated, and handled gracefully when not present.
This function should be called whenever invoking an external program, calling functions that makes changes to disk, and any other location where such handling would be necessary to preserve its feature set.
$1 - Name of command to run
$@ - Command arguments
run_sudo()
Same as run(), but run under sudo -H
run_sudo_as_user()
Same as run_sudo(), but run as a given user ($1)
run_sudo_install()
Same as run_sudo(), but runs install on with the given mode ($1), owner ($2), and group ($3).
seed_sudo()
Updates sudo timestamp, making it unlikely that subsequent calls to sudo will require a password. This may also be called periodically to ensure the timestamp remains valid across long command invocations
sudo_pipe_to_file()
Pipes stdin to a temporary file and then uses sudo to move it the named file ($1).
$1 - Name of target file
run_editor()
Runs $EDITOR with the provided arguments
run_pager()
Runs $PAGER with the provided arguments