record: simplified option parsing

thanks to @cdent and todotxt.com for inspiration