appacademy / dotfiles

Get your computer ready for App Academy!
22 stars 30 forks source link

IN-10 Add timestamp to bash history #32

Closed niartenyaw closed 6 years ago

wolverdude commented 6 years ago

Ooh, that looks cool! What's the reason for adding it?

niartenyaw commented 6 years ago

We caught a student cheating on an assessment this week. It would have been really helpful to know the times of their bash commands, but luckily the order of commands was incriminating enough.

Also it's awesome!

wolverdude commented 6 years ago

Aaah. That is useful knowledge. The one bit of reticence I have about this is that I've tried to keep these as vanilla as possible so that we're not installing a bunch of weird, idiosyncratic configurations on people's machines that they won't understand. I'm also assuming that this change won't impact the way the terminal displays the history to the user?

niartenyaw commented 6 years ago

That totally makes sense and I agree. We want to minimize the problems that can occur.

It does affect two things.

The history command now has timestamps at the beginning.

screen shot 2018-01-04 at 11 31 58 am

It also adds timestamps from epoch to the .bash_history

screen shot 2018-01-04 at 11 33 28 am

wolverdude commented 6 years ago

Okay, as long as ctrl-r and up/down are unaffected, I'm good with the merge.

niartenyaw commented 6 years ago

Just checked on my machine and they are unaffected.