Skip to content

hopeseekr/bash-timer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bash Timer

Build Status

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.0/install | bash

Manual

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

curl https://raw.githubusercontent.com/bash-timer/bash-timer/v1.0/assets/bash-preexec.sh -o $HOME/.bash-preexec.sh
echo "04947faeb7f735d37cce12d820a1766ce0eb8288b64ee119e3ca1b00c4ed69ebce  $HOME/.bash-preexec.sh" | sha256sum -c -
  1. Add the following to the very bottom of your ~/.bash_rc.
# 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 Apache v2.0 License (see LICENSE.md).

License Summary

Contributors

Theodore R. Smith theodore@phpexperts.pro
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

License

Stars

Watchers

Forks

Packages

No packages published

Languages