Remove command duration plugin and make it a theme feature

pull/1683/head
BarbUk 2020-11-14 14:09:06 +04:00
parent a2170fda1d
commit 2e8ad81e12
No known key found for this signature in database
GPG Key ID: DB301C759539E9FE
2 changed files with 8 additions and 2 deletions

View File

@ -74,6 +74,9 @@ if [[ ! -z "${BASH_IT_THEME}" ]]; then
BASH_IT_LOG_PREFIX="themes: p4helpers: "
# shellcheck source=./themes/p4helpers.theme.bash
source "${BASH_IT}/themes/p4helpers.theme.bash"
BASH_IT_LOG_PREFIX="themes: command_duration: "
# shellcheck source=./themes/command_duration.theme.bash
source "${BASH_IT}/themes/command_duration.theme.bash"
BASH_IT_LOG_PREFIX="themes: base: "
# shellcheck source=./themes/base.theme.bash
source "${BASH_IT}/themes/base.theme.bash"

View File

@ -1,5 +1,8 @@
cite about-plugin
about-plugin 'keep track of the moment when the last command started, to be able to compute its duration'
#!/usr/bin/env bash
if [ -z "$BASHIT_COMMAND_DURATION" ] || [ "$BASHIT_COMMAND_DURATION" != true ]; then
return
fi
# Define tmp dir and file
COMMAND_DURATION_TMPDIR="${TMPDIR:-/tmp}"