Other gists & tricks: http://caseywatts.com/gists-and-tricks
#Autorefresh Terminal History For giving presentations.
I've been trying to find a way to show an audience the recent terminal commands I've been calling. I can easily imagine doing this in a separate terminal window that just auto-refreshes showing the history of commands recently called.
I decided to try a ruby script! (Bash would be fine too, just comfort)
###Obtaining the history
history is the best because it formats it beautifully
However, history is a "shell builtin" so we can't access it from ruby or bash scripts.
cat ~/.zsh_history does work, but it's littered with timestamps
###Cleaning zsh_history I like timestamps in my zsh_history, so I'm using Ruby code to manually clean it up.
###Looking Ahead If you do, how do you do this?
I bet there's an easier way that works out of the box for more people. I'm just not sure what/where it is.