bash-it/test
John D Pell 6ca10cf84c plugin/cmd-returned-notify: Rewrite to match/use `lib/command_duration`
Use `$EPOCHREALTIME` (or `$SECONDS`) built-in variable provided by Bash instead of `date +%s`. We're only measuing the difference in seconds, so avoid both the binary invocation as well as the subshell.

Alsö, Reduce environmental pollution by not exporting every variable, and unsetting when done.

Change variable names to match lib/command-duration

Remove `preexec_return_notification()` in favor of `lib/command-duration`'s `_command_duration_pre_exec()`.

This should now use the same preexec hook and variables as the theme library `command_duration`.

tests: handle nanoseconds
2022-03-04 12:58:07 -08:00
..
bash_it test/bash_it: adopt newly revamped `setup()` 2022-03-03 22:43:17 -08:00
completion test/aliases: adopt newly revamped `setup()` 2022-03-03 22:43:17 -08:00
fixtures completion/alias: fix tests 2022-01-30 16:13:54 -08:00
install test/install: adopt newly revamped `setup()` 2022-03-03 22:43:17 -08:00
lib test/preexec: adopt newly revamped `setup()` 2022-03-03 22:43:17 -08:00
plugins plugin/cmd-returned-notify: Rewrite to match/use `lib/command_duration` 2022-03-04 12:58:07 -08:00
themes test/theme: adopt newly revamped `setup()` 2022-03-03 22:43:17 -08:00
lint-requirements.txt ci: Add pre-commit run and remove trailling spaces 2020-10-28 11:51:04 +02:00
run BATS: de-parallelize 2022-03-03 22:43:17 -08:00
test_helper.bash BATS: revamp test `setup()` and `setup_test_fixture()` 2022-03-03 22:43:17 -08:00