Created
February 25, 2015 17:59
-
-
Save tasermonkey/30e034432387d18ffae3 to your computer and use it in GitHub Desktop.
shell-print-date-time-on-execute
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
preexec () { | |
DATE=`date +"%H:%M:%S on %Y-%m-%d"` | |
C=$(($COLUMNS-24)) | |
echo -e "\033[1A\033[${C}C ${fg[red]}${DATE}${reset_color}" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I use this so that I know when I started executing a program.