add command time duration plugin (#1683)
This commit is contained in:
@@ -38,6 +38,7 @@ Default theme glyphs
|
||||
BARBUK_SVN_CHAR='⑆ '
|
||||
BARBUK_EXIT_CODE_ICON=' '
|
||||
BARBUK_PYTHON_VENV_CHAR=' '
|
||||
BARBUK_COMMAND_DURATION_ICON=' '
|
||||
|
||||
Customize glyphs
|
||||
^^^^^^^^^^^^^^^^
|
||||
@@ -92,6 +93,11 @@ Please refer to the following documentation for more information:
|
||||
EOF
|
||||
chmod 400 /etc/sudoers.d/keepenv
|
||||
|
||||
Command duration
|
||||
----------------
|
||||
|
||||
See :ref:`Command duration <command_duration>`.
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
@@ -122,3 +128,11 @@ Python venv
|
||||
.. code-block:: bash
|
||||
|
||||
flask ~/test on master ✓ ❯
|
||||
|
||||
Command duration
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# sleep 3s
|
||||
user@hostname in ~/bash-it on master ✓ 3.2s ❯
|
||||
|
||||
@@ -37,6 +37,29 @@ See :ref:`here <list_of_themes>`.
|
||||
Theme Switches & Variables
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. _command_duration:
|
||||
|
||||
Command duration
|
||||
================
|
||||
|
||||
Prints last command duration
|
||||
|
||||
Usage
|
||||
#####
|
||||
|
||||
Command duration can be enabled by exporting ``BASH_IT_COMMAND_DURATION``:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
export BASH_IT_COMMAND_DURATION=true
|
||||
|
||||
The default configuration display last command duration for command lasting one second or more.
|
||||
You can customize the minimum time in seconds before command duration is displayed in your ``.bashrc``:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
export COMMAND_DURATION_MIN_SECONDS=5
|
||||
|
||||
Clock Related
|
||||
=============
|
||||
|
||||
|
||||
Reference in New Issue
Block a user