Sync Alias from henrycatalinismith

If your ppl address book is cloned on multiple computers, you’re probably accustomed to using pull and push to synchronise your data using Git. If so, that’s great. You’re making the most of ppl’s core functionality. But you could probably be making more of its convenience-oriented features.

ppl allows you to configure aliases as shorcuts for often-used commands, or as a way of composing commands together. Here’s an alias called sync which does the latter.

sync = !ppl pull origin master && ppl push origin master

This allows you to execute git pull origin master and then git push origin master in your address book directory by simply entering ppl sync. For most users, this probably automates the entire synchronisation process.

Bear in mind that this alias will only work if you keep your contacts on the master branch and have a remote called origin. If your setup is more complex than that, you may have to get creative with your aliases to achieve this level of laziness.


Got a tip or trick you want to share with the community? Want to add it to the core documentation, under your own name and with an attribution link? If you've got what it takes, just write it up and email me, or better still, send a pull request!