Saving your crontab in your dotfiles

In order to share them across several machine, like a lot of people, I synchronize my dotfile using a DVCS on a public repository. I save as much stuff as I can, provided it does not contains sensitive stuff like passwords. Problem: How do you save your crontab? I finally had a look at the crontab manual to realize that crontab could be called on a file. The following line goes into my ~/.zshrc:

alias crontab-e='vi ~/.crontab && crontab ~/.crontab'

Edit: I now find even better to use a shell function rather than an alias:

if test -z $CRONTABCMD; then
    # allows to source zshrc twice
    export CRONTABCMD=$(which crontab)
        if [[ $@ == "-e" ]]; then
            vim ~/.crontab && $CRONTABCMD ~/.crontab
            $CRONTABCMD $@
    $CRONTABCMD ~/.crontab

Comments !