Simple way to track time spent on projects that is resilient to user forgetfulness. Much better than collecting timestamps from git commits. Could be interesting to merge with git history and measure how productivity (some combo of bash activity and git activity and lines-of-code/Kolmogorov-complexity) change with time-of-day, season, weather, etc.
Simple way to track time spent on projects that is resilient to user forgetfulness. Much better than collecting timestamps from git commits. Could be interesting to merge with git history and measure how productivity (some combo of bash activity and git activity and lines-of-code/Kolmogorov-complexity) change with time-of-day, season, weather, etc.
# store timestamps
export HISTTIMEFORMAT="%F %T "
# append immediately (affects timestamps?)
PROMPT_COMMAND="$PROMPT_COMMAND; history -a"
# do not limit .bash_history file size
export HISTFILESIZE=""
# append mode (collect from multiple shells)
shopt -s histappend
# multi-line commands as single record
shopt -s cmdhist