Skip to content

Instantly share code, notes, and snippets.

@mrbalihai
Last active September 30, 2019 11:36
Show Gist options
  • Save mrbalihai/c795766ecf5f492137893360092967ed to your computer and use it in GitHub Desktop.
Save mrbalihai/c795766ecf5f492137893360092967ed to your computer and use it in GitHub Desktop.
shell aliases for timeclock logging with hledger
export TIMELOG="/home/rbollons/Documents/Work Log/Log.timeclock"
log_time_in () {
echo i $(date "+%Y-%m-%d %H:%M:%S") $* >>$TIMELOG
}
log_time_out () {
echo o $(date "+%Y-%m-%d %H:%M:%S") >>$TIMELOG
}
alias lg="vim '$TIMELOG'"
alias ti=log_time_in
alias to=log_time_out
alias timesheet="hledger -f '$TIMELOG'"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment