Skip to content

Easily add Human-readable execution time for every command in bash!

Notifications You must be signed in to change notification settings

hopeseekr/bash-timer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bash Timer

Shows a human-readable execution time for every command run in bash.

You might also find my Amazing Linux, PHP, and Git Aliases quite useful as well.

The time will show up in the bottom left, immediately left of your $PS1.

bash-timer image

2 days 05:02:11.33 # A very long process

Installation

Use the Installer

curl https://raw.githubusercontent.com/hopeseekr/bash-timer/v1.5.0/install | bash

Manual

  1. Download the files:
curl https://raw.githubusercontent.com/hopeseekr/bash-timer/v1.5.0/bash-timer.sh -o $HOME/.bash-timer.sh
echo "c9cf58a86712eb7360e08a072d03e53548e5e362944ab651aa71ee2a7846d22f $HOME/.bash-timer.sh" | sha256sum -c -

curl https://raw.githubusercontent.com/hopeseekr/bash-timer/v1.5.0/assets/bash-preexec.sh -o $HOME/.bash-preexec.sh
echo "d512aa6043d69d636f0db711aab1675cc7c49b39da9ae58afcfb916dca8c4464 $HOME/.bash-preexec.sh" | sha256sum -c -
  1. Add the following to the very bottom of your ~/.bashrc.
# Bash Timer
# See https://github.com/hopeseekr/bash-timer
[[ -f ~/.bash-timer.sh ]] && source ~/.bash-timer.sh

# See https://github.com/rcaloras/bash-preexec
# **WARNING:** This must be the last line of your .bashrc.
# Source our file at the end of our bash profile (e.g. ~/.bashrc, ~/.profile, or ~/.bash_profile)
[[ -f ~/.bash-preexec.sh ]] && source ~/.bash-preexec.sh

License

This project is licensed under the Creative Commons Attribution License v4.0 International.

License Summary

Contributors

Theodore R. Smith [email protected]
GPG Fingerprint: 4BF8 2613 1C34 87AC D28F 2AD8 EB24 A91D D612 5690
CEO: PHP Experts, Inc.

About

Easily add Human-readable execution time for every command in bash!

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages