This works fine as long as you call it with --save ~/... if you use --save=~/... then bash sees that as one expression and doesn't expand the ~
This works fine as long as you call it with
--save ~/...
if you use
--save=~/...
then bash sees that as one expression and doesn't expand the ~