Since several weeks I wonder something about my zsh configuration and I cannot find a good solution. Maybe you, my faithful reader, you have an idea !

Let me explain.

I have a function called scpzshconf which copy my zsh configuration files on a remote host using tar c | ssh remotehost tar x -. So when I change my configuration on my workstation, I have to do scpzshconf to many hosts. I would like to have something (a zsh function for example) which would be able to check which zsh configuration files are running on remote host and compare it with the version I am running localy. If remote version is older than local one, then it should scpzshconf from local host to remote host. (Just remember that sometimes I am using connections that are NATed).

Example:

local % cat ~/.zsh/configversion
2
local % ssh remote
remote % cat ~/.zsh/configversion
1

And then it should copy zsh configuration from local to remote.

Any idea how to handle this ?