bash-it/test/plugins
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
..
base.plugin.bats test/base: lose old TravisCS skip 2022-03-03 23:02:29 -08:00
battery.plugin.bats Revert dc380e9ed6 2022-03-03 23:33:05 -08:00
cmd-returned-notify.plugin.bats plugin/cmd-returned-notify: Rewrite to match/use `lib/command_duration` 2022-03-04 12:58:07 -08:00
go.plugin.bats test/go: adopt newly revamped `setup()` 2022-03-03 22:43:17 -08:00
ruby.plugin.bats test/ruby: adopt newly revamped `setup()` 2022-03-03 22:43:17 -08:00
xterm.plugin.bats test/xterm: adopt newly revamped `setup()` 2022-03-03 22:43:17 -08:00