From c2a392a7dfe06b7ae866481744a2291c9a8f1da5 Mon Sep 17 00:00:00 2001 From: BarbUk Date: Sat, 21 Nov 2020 10:49:24 +0400 Subject: [PATCH] Update readme to explain command duration usage --- themes/barbuk/README.md | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/themes/barbuk/README.md b/themes/barbuk/README.md index de90c9f9..fc79b49e 100644 --- a/themes/barbuk/README.md +++ b/themes/barbuk/README.md @@ -30,6 +30,7 @@ BARBUK_HG_CHAR='☿ ' BARBUK_SVN_CHAR='⑆ ' BARBUK_EXIT_CODE_ICON=' ' BARBUK_PYTHON_VENV_CHAR=' ' +BARBUK_COMMAND_DURATION_ICON='  ' ``` ### Customize glyphs @@ -81,11 +82,21 @@ chmod 400 /etc/sudoers.d/keepenv ## Command duration -Command duration require the the cmd-duration plugin. -You can enable it with: +Command duration reports the duration of the last command. + +### Usage + +Command duration can be enabled by exporting `BASH_IT_COMMAND_DURATION`: ```bash -bash-it enable plugin cmd-duration +export BASH_IT_COMMAND_DURATION=true +``` + +All duration of one second and more are displayed. +You can customize the minimum time in seconds before command duration is displayed in your `.bashrc`: + +```bash +export COMMAND_DURATION_MIN_SECONDS=5 ``` ## Examples @@ -118,5 +129,5 @@ user@hostname in  ~/bash-it on  master ✓ ❯ ```bash # sleep 3s -user@hostname in  ~/bash-it on  master ✓  3s ❯ +user@hostname in  ~/bash-it on  master ✓  3.2s ❯ ```